Running ghost with PM2 under a different user account on a Linux server

When I first setup my ghost blog on my own server (a self-managed Linode which has been great and I highly recommend them), I installed Node.js directly under my main user account. I eventually ran into the problem of needing/wanting to use different versions of Node.js for different applications, so I uninstalled Node.js and installed/used nvm instead. It occurred to me that I might be better off running the ghost application under a different user account, so that it could manage it’s own nvm/Node. »

Writing a JavaScript Promises Library

Updated 29/05/2015 My first exposure to JavaScript Promises was at a JavaScript meetup a couple of years ago and despite being a talk by a very good presenter, it was an early stage in my JavaScript understanding and most of the topic went over my head. Nowadays Promises are quite common and most developers will probably have had some level of exposure, whether they understand them or not. »

Beware the DOM Reflow

TL;DR Don’t ever use a CSS transition with any CSS property that causes a DOM reflow, you will never get smooth transitions, even if you attempt to use a common hack to force GPU rendering of the transitioning DOM element. Try to use the CSS transform property instead of something like left or width for transitions. A little background I’ve been working on a mobile app using Cordova (PhoneGap) and AngularJS which has been quite fun to work with so far. »

Pregnancy Risk Factors

So I’m a guy, not a medical professional and I’m going to talk about pregnancy, this is probably one of the few seasons in life where a guy can get away with it so let me just get up on my soap box. One of the things that has surprised me most talking to various people throughout my wife’s pregnancy is how there’s almost a negative reaction from older generations (and to a lesser extent others in the same generation) when my wife tells them that she’s following the various eating and lifestyle guidelines that are given to pregnant women. »

Simple JavaScript template engine

Around 6 months ago while learning JavaScript properly and looking for work as a JavaScript developer I started working on a pure HTML/CSS/JS version of Tetris (BlockDrop - github) to experiment and play with my new skills. It’s been a while since I’ve touched it but I just started looking at it again recently and there’s quite a lot that I’d do differently now so I started rewriting it from the ground up. »