~ willcodeforfoo /.bash_profile

Changes the prompt red when superuser
#
# .bashrc (Universal)
# Kevin Marsh <kevin@kevinmarsh.com> Last updated 10/15/2006

PROMPT_COLOR='35;1m'

# Bright red prompt if we're root
if [ ${UID} -eq 0 ]; then
  PROMPT_COLOR='1;31m'
fi

# Get the current revision of a repository
svn_revision()
{
  svn info $@ | awk '/^Revision:/ {print $2}'
}

# Does an svn up and then displays the changelog between your previous
# version and what you just updated to.
svn_up_and_log()
{
  local old_revision=`svn_revision $@`
  local first_update=$((${old_revision} + 1))
  svn up -q $@
  if [ $(svn_revision $@) -gt ${old_revision} ]; then
    svn log -v -rHEAD:${first_update} $@
  else
    echo "No changes."
  fi
}

# Open a manpage in Preview, which can be saved to PDF
pman()
{
   man -t "${1}" | open -f -a /Applications/Preview.app
}

# Aliases
alias ll="ls -lhFG"
alias dir="ll"
alias ls="ls -FG"
alias lm='cd ~/Sites/lifemetric'
alias gemlist='gem list | egrep -v "^( |$)"'
alias irb='irb --readline -r irb/completion'
alias top='top -ocpu'

# Variables
export PATH="~/bin/:/usr/local/bin:/usr/local/mysql/bin:/usr/local/sbin:${PATH}"
export PS1="\[\e[${PROMPT_COLOR}\]\u@\h:\W\$ \[\e[0m\]"
export HISTIGNORE=""
export HISTSIZE=100000
export HISTFILESIZE=409600
export EDITOR="mate -w"
export VISUAL="mate -w"
export PAGER="less"
export CLICOLOR="yes"
export INPUTRC="~/.inputrc"
export EVENT_NOKQUEUE=1               # for memcached

complete -C ~/bin/rake_completion.rb -o default rake

# Cache, and complete, Cheats
if [ ! -r ~/.cheats ]; then
        echo "Rebuilding Cheat cache... "
        cheat sheets | egrep '^ ' | awk {'print $1'} > ~/.cheats
fi
complete -W "$(cat ~/.cheats)" cheat

# Create files as u=rwx, g=rx, o=rx
umask 022