Created
February 15, 2011 21:11
-
-
Save joelklabo/828249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DISPLAY=:0.0 | |
export PATH=$PATH:/opt/local/bin:/opt/local/sbin | |
export MANPATH=$MANPATH:/opt/local/man | |
export PATH=/opt/ruby-enterprise-current/bin:$PATH | |
export PATH=/opt/local/lib/postgresql84/bin:$PATH | |
# For JSYammerDesktop | |
export ADL_PATH=/users/jklabo/AdobeAIRSDK/bin/adl | |
export ACOMPC_BIN=/users/jklabo/AdobeFlexSDK/bin/acompc | |
export YAMJS_HOME=/Users/jklabo/src/yamjs | |
export WORKFEED_DIR=/Users/jklabo/src/workfeed | |
# For command-line gisting | |
export GITHUB_USER="joelklabo" | |
export GITHUB_TOKEN="5fe941a00f17724f870da82e06106a87" | |
alias wf='cd ~/src/workfeed' | |
# For Git, from https://docs.google.com/a/yammer-inc.com/Doc?docid=0AcGgqbKaXXn_ZGZtemttcWhfNDJmbng4Z3RkNA&hl=en | |
alias gss='git submodule --quiet foreach "(git status -a > /dev/null && echo \$path) || true"' | |
alias gst='git status' | |
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff | vim' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias glog='git log --name-status' | |
alias glogme='git log --name-status --author=$USER' | |
alias gpick='git cherry-pick' | |
alias gmaster='git co master' | |
alias gcm='git co master' | |
alias gcr='git co r/11.0' | |
alias rakev='rake TESTOPTS=-v' | |
# For Rails | |
alias db='psql -Upostgres yam_development' | |
alias ptl='tail -f log/development.log' | |
alias apacherestart='sudo /usr/bin/apachectl restart' | |
alias ss='script/server' | |
alias sc='script/console' | |
alias sgm='script/generate model' | |
alias sgc='script/generate controller' | |
alias sgs='script/generate scaffold' | |
alias psx='ps auxw | $1' | |
function tab { | |
# Usage: tab name [command] | |
local name=$1 | |
local cmd=$2 | |
local tabdir=$HOME/Library/tabs | |
local file=$tabdir/$name | |
mkdir -p $tabdir | |
rm -f $file | |
if [ "$cmd" = '' ]; then | |
# No command specified, just rename tab. | |
# This idea for this came from: http://psuedogreen.org/blog/set_tab_names_in_leopard_terminal.html | |
ln 'which sleep' $file | |
$file 5 $ | |
local tabpid=$(jobs -X echo %+) | |
disown %+ | |
kill -STOP $tabpid | |
else | |
# Rename tab and execute command. | |
shift 2 | |
ln 'which $cmd' $file | |
$file $@ | |
fi | |
rm -f $file | |
} | |
function parse_gb { | |
cut -c17- .git/HEAD 2> /dev/null | |
} | |
PS1="\h:\W \[\033[01;33m\]\$(parse_gb)\[\033[00;37m\]$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment