How your base PATH gets generated in OSX

On OSX and linux it seems to be fairly common practice to totally define the PATH in a .profile or .bashrc file. This gives total control over the order in which various locations are searched through. Here’s the line from my .profile:

How to not break permalinks in WordPress

I’ve written a blog post for work about how much you can and can’t mess around with urls in WordPress before old links stop working. It boils down to 5 rules:

Managing identity in git

When using git, your commits are labelled with your name and email address. These are usually based on the user.name and user.email fields in a global .gitconfig file in your home directory, ensuring that these values are always available.

Pivotal talk: data-informed product decisions

http://www.meetup.com/Pivotal-Labs-Tech-Talks/events/213571202/

Migrating Postgres data from an old Rails project to a new one

TL;DR - this was my approach:

Creating a new app on heroku really is stupidly easy

heroku apps:create swingoutlondon2 --region eu
git push heroku master
heroku run rake db:migrate

A better way of writing commit messages

I’ve always tended to write commit messages by answering the question “What did I do?”, but I learned a different approach recently which tends to produce much more expressive commits, which are often more terse as well. Compare the following:

Useful rake tasks in Rails

When inside any directory with a Rakefile, you can bring up the list of available rake tasks with rake -T

Matching on a final segment of a string

when matching on the final segment of a string, e.g for a file extension, you could use a regular expression:

Gotcha: Initialising RSpec in a rails project

I use RSpec for doing TDD, and the rspec-rails gem for integration in Rails projects. On initialising RSpec for SOLDN2, with rspec init it generated the following spec helper (comments removed):