Code + Product

Serving PHP with FPM (FastCGI) using Nginx on CentOS

Mar 11th, 2015 in Servers and Scaling

Installation steps to start serving any PHP application (eg Wordpress) using FPM on CentOS, together with a sample Nginx config file.

Testing a $rootScope broadcast event with Jasmine

Feb 23rd, 2015 in AngularJS and Javascript

A short snippet for testing AngularJS with Jasmine.

Rails 4 Conditional Page Cache for Logged In Users

Feb 18th, 2015 in Ruby on Rails

A technique to generate a full static HTML page for caching, based on any specified conditions.

Recommended Rspec style for Rails models

Feb 11th, 2015 in Ruby on Rails

Listing out my top 10 recommendations for how to structure and layout rspec tests for Rails models.

Simple sysadmin tools - Screen on CentOS

Feb 4th, 2015 in Servers and Scaling

Screen is one of my favourite utilities when managing servers - it allows you to use multiple shell windows from a single SSH session and to keep these active even after logging out. It is super useful for monitoring long-running processes.

Should I use AngularJS or jQuery?

Jan 30th, 2015 in AngularJS and Javascript

AngularJS has a good balance of maturity, community support, and productivity - suitable for use either by itself or together with jQuery in production apps.