Phil McClure

This is a useful command combo if you need to search your git commit history for a keyword then view the resulting file. git grep $(git rev-list --all) git show REVISION:path/to/file The first command does a search, based on the supplied...
Now and again you might want to extract out complex logic into its own class and access instances of shared functionality via your Helpers and Events. Ideally what I want to do is create an instance in the created hook and then make use of that...
I decided to compile (and maintain) a list of large deployment and scaling tools. Mainly for myself but hopefully it’ll be helpful to some other people as well. I’ll be updating this list over time so check back! Operating...
So recently I’ve been practicing some common algorithms in Ruby and I thought it might be good to document them as I do them and put them online for everyone to share. I’ve been documenting them with docco and they’re available here...
This caught me out after formatting my mac and reinstalling the OS. If you are installing a npm module with a related binary you need to make sure the bin location is in your PATH. It’s easy enough to do this. First you need to find where the...
There are a lot of meteor boilerplate templates out there. For those of you who don’t know, boilerplate templates define the way you should structure your application. The aim of boilerplate templates is to give you a head start by creating a...
I’m always looking for ways to improve my programming skills. One approach that I’ve long been aware of is Dave Thomas’s code kata. A 'Code Kata' is a practice session on a given programming problem, much like Kata that is used to practice and...
Honestly, people will probably wonder why I didn’t know this already. Base64’ing a file and getting it onto your clipboard from the command line? It’s as easy as calling the base64 command and piping to pbcopy:- base64 | pbcopy
When I’m commuting into work I generally give BBC Radio 1 a miss and listen to podcasts in the car. So given I’ve been doing it for a while now, I thought I would share ones that have stood the test of time. There aren’t very many, I like to keep...
I finally got round to making the relevant changes to allow the green_light gem to work with Rails 4. This has been long overdue since there are quite a lot of legacy apps making use of it. There is one main difference to take note of in this...