My first Magento 2 contribution

Ok, so I guess I’m stepping up the ladder now, become one of the “grown-ups”, in the Magento Universe?!

The issue

Of course not! Not with this one. However, I’ve just opened my 1st Magento2 contribution, in the form of a pull-request (found here: Pull Request ).

The problem was rather simple: the remote_ip field in both  sales_orders and quote tables was 32 chars long, and to store IPV6 addresses, 45 is required.

Hope it’ll get approved and merged, fingers crossed 😀

Update: automated tests passed for the PR.

Magento 2 Pull Request
Magento 2 Pull Request


Old laptop display brought back to life!

A long time ago, used to have a Dell Vostro. It was a beauty, I must say. 17inch wide display, 16RAM, Intel i7 processor, 500GB hard-drive.

On the downside – well… it was a Dell. Chunky, like old Dells were, back in the day. It served it’s purpose for me, for quite a few years, and after I was done with it, my son used it for… well – gaming. Most of them old “retro” games. That was until I introduced the RetroPie build in our household 🙂

Continue reading


Almost new year

Whoaa! It’s been a while since I wrote something on this blog!

So, almost new year. I’ll try not to make the usual “my new year resolution is 1440x……”. Oh sh*t! Just did! 🙂

In “other news”, Santa got my son a PS4 this year, and it was a bundle with the “Uncharted 4” game. Maaaan, that was a really bad decision… The other night I stayed up until almost 4am to play. Haven’t done this since I was 20-something. Still recovering, but I think I’ll “temp fate” again tonight, let’s see what happens. Even more so after finishing the session last time, I thought “yeah, I feel like I’m close to finish the game” and noticed that my progress was at about 3% of the entire game! I mean… 3! THREE!!! Something must me done! Will try and stay up late tonight again! 😀 Continue reading


Changes. Big Changes!

I’ll try to keep this short.

So, a bit over 6 years ago I was knocking on a new door, having an interview for a “web developer” position. Got the job (phew!) and so an amazing journey started. I do remember we were a handful of people in a tiny office in Birchwood, Warrington. Continue reading


Magento 2 API usage

Recently, in my day to day activities I had to figure something out with the Magento API. Magento 2 that is. Which is a beast, to say the least (hey! just made a rhyme!).

Anyway, I posted the question  I had at the time in the Magento dedicated subsite on StackExchage in the hope that someone from the well-formed community can give me an answer. Unfortunately nothing yet (posted about a week ago, at the time of writing this). Continue reading


Oh, recruiters…

Part of having an account on LinkedIn is getting tons of emails from recruiters. If  the advertised roles are relevant to you or not, that’s another question. If I think about it actually – is there another benefit of having a LinkedIn account?!

From time to time though, I get real gems like the following: Continue reading


Media Centre Automation

Today, being Saturday and having a bit of spare time on my hands, seemed like a brilliant idea to have a go at furthering my “skills” with the Amazon Alexa gadget. This time, I wanted to see how an integration between Alexa and the KODI media centre would be like. In simple terms, the workflow is kinda like this:

  • you tell Alexa a command
  • Alexa calls your “skill” built specifically for this occasion
  • this “skill” recognises your “intent” and communicates with an Amazon Lambda function that you have to build
  • the Lambda function sends a message to the webserver you built in your home and faces both the “outside world” and your intranet
  • the webserver interprets the Lambda signal and instructs the media centre to do your bidding
  • done!

Again, as I said, that’s in simple terms. The reality was a bit more complicated, but really exciting, I have to say.

Step I: The Raspberry PI Webserver

Yesterday evening, I dusted my Raspberry PI which was powered of since… a few years ago 🙁 Installed a new, fresh OS, went with the lite version of Raspbian, which is based on Debian Jessie. No graphical interface, no window managers, just a “hardcore” CLI. Some time later, after the OS installation, got nginx as a webserver and PHP5 (the fpm “flavour”) for the scripting interpreter up and running. The conf file for the nginx server looks like this:

server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/html/xbmc/public;

	index index.php;

	server_name _;

	location / {
		#try_files $uri $uri/ =404;
		try_files $uri $uri/ /index.php$is_args$args;

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
    		fastcgi_pass unix:/var/run/php5-fpm.sock;
    		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    		include fastcgi_params;

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	location ~ /\.ht {
		deny all;

Note: I later added a htpasswd protection, since the webserver is web-accessible. Once that was out of the way, it was time to proceed to the next step:

Step II: The Web Application

Ok, the webserver is up and running, time to build a web-app that will allow me to send control messages to the KODI media centre. Now, KODI’s got a decent API that you can use, an easily enough, it’s JSON driven, so pretty simple to use. Since this is just for testing/playing, I didn’t bother to enable basic http-auth in KODI for this, so I can easily send messages to it. Right! Since lately in the office the platform Laravel was mentioned, I thought it’ll be good to step out of my “comfort zone” that is Magento and try different things. Easy enough, “composed” laravel and created a new project. For IDE, I am using PhpStorm – is there anything better, anyway?! 🙂 No expert in laravel, but a couple of hours later was having a functional web application that was sending KODI pretty much the basic remote control signals: arrows (left, right, up & down), the “select” key, volume 1-100 in increments of ten, a “back” and “home” signals and that’s about it. Enough to start playing. The entire codebase for the app is available on my gitHub page:

Step III: The Alexa Skill

Time now to dive in the Amazon Developer Portal and put the “skill” itself together. It’s not something that’s rocket-science, it’s more a matter of reading a bit of documentation (and they really do have documentation!) and do some trial and error. This is pretty much where you’re defining your Alexa skill interaction. You have your “intents” and your “utterances”. These are kind of how your voice commands are mapped to the application, what functions should be triggered and what parameters should be sent to your (next step) Lambda function.

    "intents": [
        "intent": "GoRight"
        "intent": "GoLeft"
        "intent": "GoHome"
        "intent": "GoUp"
        "intent": "GoDown"
GoRight go to the right
GoLeft go to the left
GoUp go up
GoDown go down
GoHome go home
SelectItem select item
SelectItem proceed
SelectItem engage
GoBack go back
GoBack level up

Step IV: The Lambda Function

The Amazon Lambda is a cloud platform that enables you to run your own functions/apps without the need to run a a dedicated server available online. You’ve got a choice of a few programming/scripting languages (C#, Python, NodeJS), I’ve chosen to go with NodeJS, closer to my day-to-day operations 🙂 I won’t paste the entire function written, it’s a mess to be honest, hey, I’m just getting started with this, ok? 🙂

Step V: The Result

Towards the evening, the pieces were ready to be glued into places and to tweak some bits and bobs. After a bit of trial and error, finally got it working. Planning to extend this to be a rich voice interface for my KODI media centre. For the moment it’s pretty basic, but pretty amazing, when you think of the possibilities.