How to check if a JPEG is progressive

I’m trying to optimise my JPEGs so that they’re progressive. That way they will appear to load quicker for visitors to my website. This practise seems to be gaining steam recently. In fact, remember in the late 90’s when computers and internet spe...

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…