ported a bunch of useful stuff from thoughtbot's dotfiles