Latest Posts

removeEventListener and this

Have you ever tried to call removeEventListener on a previously attached element and couldn't remove it? Did you maybe try to pass a function to addEventListener that is bound to another context? The context of the callback that we are passing to addEventListener is the same as the event.currentTarget when is being called. The problem is that when we bind the callback to another object, we can't remove it afterward. Lets see an example: let element = document.createElement('button') »

Deploying Node.js Applications on DigitalOcean using Ansible

I was in the need to be able to automatically create a machine on DigitalOcean for my personal projects, provision it and then upload an app and run it. Then I wanted to be able to deploy it again later on or make changes to the infrastructure in a more controlled way. I wanted to automate the whole process so I can save some time and spend it on actually writing code. The problem Up until recently, bootstrapping of my »

Sending and receiving emails when on Github Pages

If you, like me, like to host simple little sites of yours on Github Pages, I am sure you have already reached the moment when you wanted to send emails from that site but you didn't know how to. This is how I did it. devastation.tv, my podcast for developers (for the time in Greek only) is hosted on Github Pages with a custom domain that I have purchased from Namecheap. I wanted to be able to send email »

Database Migrations with Nodejs

A database is a vital part of every complex application. Databases change very often and contain data that can even disintegrate our whole application if they get out of sync. Changing a live database, whether it's related to schema or data, can be hard. Modern apps, where Agile methodologies along with processes such as Continuous Integration apply, have raised the bar of complexity so maintaining a database separately from the application's business logic can be quite painful. Fortunately, we have »

Live the dream

Sometimes we feel like still chasing the dream. Like it is still far away.  Think again. What were you dreaming of last year? Five years ago? What about when you were 15 years old. What was your goal back then?  I feel like I'm living my last year's dream. I do. And now I dream bigger. I want to feel it again next year. And after five years. And after thirty years. I forgot that I am already living my »