Rake Tasks, Arguments and Default Values

I had a discussion with a coworker today where he openly asked if rake tasks can take arguments… and if they can, can the task’s arguments have default values set. Passing defaulted arguments to a rake task is actually super easy and I can definitely empathize with people who ask have no idea this is possible. […]

Getting the pg Gem Installed with Postgres.app

I use Postgres.app to run a local Postgres server while doing development work and it’s great. Postgres.app basically provides a completely contained pg server that’s ready to go out of the box — just launch the app and you’re good to go. Unfortunately because it’s a self contained app things are installed in non-standard places. […]

Ruby’s % Notation

For some reason my brain has defected and has chosen a life of NEVER being able to recall basically anything related to Ruby’s % notation. After seeing this list on a recent Arkency blog post (an awesome blog) I’ve decided to steal repost it here for my own personal reference.   %q[ ] # Non-interpolated String […]

Git: Rename Author / Committer Across All Commits

Sometimes you accidentally commit code under the wrong author or committer credentials.  This has happened to me a few times while writing code from computers with global git settings.  By using `git filter-branch` it is possible to rewrite history… muhahahah! This snippet will run through your branch’s historical commits and rename the author and committer attributes. It basically looks […]

Who Said That One Violent Psychopath Quote?

There’s an amazing quote I see floating around the Internet sometimes… “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live” The quote is sometimes mistakenly credited to Martin Golding in 1994. The reality is that in 1991 John F. Woods authored it in […]