Install node.js packages via npm with a Chef Cookbook

I wanted to set up a Vagrant instance with node.js and some specific packages pre-installed. I found a Chef cookbook to install node and after a bit of work have a cookbook that will install arbitrary node packages through npm. I based this heavily on balbeko’s chef-npm cookbook with modifications to accept a data bag list of npm packages. ...

June 6, 2013 · 1 min · Kevin Sookocheff

Saving canvas data to an image file with JavaScript and PHP

Saving HTML canvas element data to an image in a user friendly manner is a tricky problem. Let’s look at one way to solve it. ...

July 27, 2011 · 2 min · Kevin Sookocheff

Date.now() in IE6

I was fiddling with a JavaScript timer application and noticed a bug in IE6. I’m sure this is documented elsewhere but I couldn’t find anything with some quick searches; hence this post. ...

June 9, 2011 · 1 min · Kevin Sookocheff

The JavaScript click event and hidden input elements

I was recently working with the HTML canvas element and wanted to attach an event to the canvas that would fire the click event of a file input element. I would then hide the input element so that the canvas element was the only way to browse for files. ...

June 2, 2011 · 1 min · Kevin Sookocheff

Dissecting jQuery's Fade Animation

Fade animations are a standard tool in any jQuery developer’s toolbox. But how do they really work? Let’s create a small function that encapsulates solely the fade functionality and find out. ...

May 18, 2011 · 2 min · Kevin Sookocheff

How to Display HTML5 Notifications

Chrome recently introduced support for HTML Notifications. Following the brief tutorial at HTML5 Rocks I was able to implement this in a matter of minutes and I couldn’t be happier with the results. ...

May 6, 2011 · 2 min · Kevin Sookocheff

Constants in JavaScript

How are constants declared in JavaScript? ...

April 20, 2011 · 1 min · Kevin Sookocheff

Understanding Closures in JavaScript

Closures are easy. There I said it. Invest a little bit of time, and you will say it too. Follow along with me as I attempt to explain what closures are and how they are used. ...

January 19, 2011 · 2 min · Kevin Sookocheff