How to wrap fs.exists() within a Promise

I have started using the Q module - an implementation of the Promises specification. One nifty function it provides is denodify. This makes it easy to convert a Node.js function (which takes a normal callback) into one which returns a Promise. All...

Mocking calls to a class constructor in Javascript

The other day, whilst writing tests with SinonJS I realised that there was no obvious way of mocking calls to class constructors in Javascript. A quick search for “mocking Javascript class constructor” did lead me to some helpful answers.

Wordpress Flickr Embed 1.1 released

I’ve just pushed out a new release of Wordpress Flickr Embed, a plugin which makes it really easy to insert Flickr images into your posts. The big new thing is…

If I had Google Glass… #ifihadglass

If I had Google Glass I would want to recreate the Darknet glasses featured in Daemon Inc. by Daniel Suarez. The Darknet is a network of people connected through the internet, coordinating activities using an RPG-like HUD visible through the glass...