Skip to content

Instantly share code, notes, and snippets.

@loe
Created August 19, 2008 17:25
Show Gist options
  • Save loe/6207 to your computer and use it in GitHub Desktop.
Save loe/6207 to your computer and use it in GitHub Desktop.
HISTFILESIZE=1000000000
HISTSIZE=1000000
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
# Faster Navigation
alias ll='ls -al'
alias search=grep
alias mc='mc -c'
alias ..='cd ..'
alias ...='cd ../..'
alias sc='./script/console'
alias ss='./script/server'
# Git is awesome.
alias gb='git branch --color'
alias gba='git branch -a --color'
alias gca='git commit -v -a'
alias gco='git checkout'
alias gd='git diff | mate'
alias gdc='git svn dcommit'
alias gf='git fetch'
alias gl='git pull'
alias gp='git push'
alias gst='git status'
alias grb='git rebase'
# MySQL short cuts
alias start_mysql='sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist'
alias stop_mysql='sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist'
# nginx short cuts
alias start_nginx='sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist'
alias stop_nginx='sudo launchctl unload -w /Library/LaunchDaemons/org.macports.nginx.plist'
alias restart_nginx='stop_nginx && start_nginx'
# gc => git checkout master
# gc bugs => git checkout bugs
function gc {
if [ -z "$1" ]; then
git checkout master
else
git checkout $1
fi
}
# Compress the cd, ls -l series of commands.
alias lc="cl"
function cl () {
if [ $# = 0 ]; then
cd && ll
else
cd "$*" && ll
fi
}
export CLICOLOR=1
export TERM=xterm-color
export PS1='\[\033[01;32m\]\w\033[00m\]$(__git_ps1 " (%s)") \$ '
export EDITOR=mate
export VISUAL=mate
export SVN_EDITOR='mate -w'
export GIT_EDITOR='mate -w'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment