Phil McClure

This one had me scratching my head for a while so I thought I’d write up the solution. Usually, the 502 error signifies that you haven’t exposed the appropriate port in your Dockerfile - i.e. the Downstream server is complaining that it can’t conn...
This has been bugging me for a few months now. When I pressed up arrow to access terminal history the current command would sometimes not be cleared and the command from history would be appended to the end of it. Or if I pasted in a line longer ...
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 [regexp] $(git rev-list --all) git show REVISION:path/to/file The first command does a search, based on the suppli...
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...
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 Systems CoreOS Mesosp...
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 rubyalgorithm...
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 n...
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 st...
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 ref...
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