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 ZSH=$HOME/.oh-my-zsh | |
export ZSH_THEME="bruce" | |
plugins=(git osx dribbble) | |
source $ZSH/oh-my-zsh.sh | |
export DISABLE_AUTO_UPDATE="true" | |
################################################################################ | |
# PATH Setup | |
export PATH=/usr/local/bin:/bin:/usr/sbin:/sbin:/usr/bin:/usr/local/sbin | |
export PATH=$PATH:/usr/local/git/bin | |
export PATH=$PATH:/usr/local/mongodb/bin | |
export PATH=$PATH:/Applications/MAMP/bin/php5.3/bin/ | |
export PATH=$PATH:/opt/local/bin | |
export PATH=$PATH:/Library/PostgreSQL/9.0/bin | |
export PATH=$PATH:/Developer/usr/bin | |
export PATH=$PATH:$HOME/.bin | |
export PATH=$PATH:$rvm_path/bin | |
export PATH=$PATH:bin | |
export PATH=$PATH:/usr/local/texlive/2010/bin/x86_64-darwin | |
################################################################################ | |
# Git completion | |
autoload bashcompinit | |
bashcompinit | |
source `brew --prefix`/etc/bash_completion.d | |
################################################################################ | |
# Aliases | |
alias todo="grep -r 'TODO' *" | |
alias wtc="git commit -m \"$(curl -s http://whatthecommit.com/ | grep '<p>' |cut -c 4-)\"" | |
alias bitch,="sudo" | |
alias reload!="source ~/.zshrc" | |
alias cmi="./configure && make && sudo make install" | |
alias pg_start="pg_ctl -D /usr/local/var/postgres start" | |
alias pg_restart="pg_ctl -D /usr/local/var/postgres restart -s -m fast" | |
alias pg_stop="pg_ctl -D /usr/local/var/postgres stop -s -m fast" | |
alias tunnel="ssh -D 8080 -C -N bruce@vps.brucespang.com" | |
# Fix zsh's autocompletion | |
alias dl="nocorrect dribbble log" | |
alias dr="nocorrect dribbble" | |
alias status='git status' | |
alias pull="nocorrect pull" | |
alias htty="nocorrect htty" | |
alias terminitor='nocorrect terminitor' | |
alias mvim='nocorrect mvim' | |
alias knife="nocorrect knife" | |
alias gsed="nocorrect gsed" | |
alias rebar="nocorrect rebar" | |
# chmod | |
alias rw-='chmod 600' | |
alias rwx='chmod 700' | |
alias r--='chmod 644' | |
alias r-x='chmod 755' | |
function irc () { | |
ssh -t bruce@fever.brucespang.com "screen -r irc || screen -S irc irssi" | |
} | |
# Start or resume irssi | |
function irssi () { | |
if grep irssi <<< `screen -ls`; then | |
screen -x irssi | |
else | |
screen -S irssi irssi | |
fi | |
} | |
# Quickly create a pow app | |
function pow () { | |
if [ ! ${1} ] | |
then | |
current_dir=`pwd` | |
name=`basename $current_dir` | |
ln -s $current_dir $HOME/.pow/$name | |
elif [ $1 = "start" ] | |
then | |
echo "starting..." | |
launchctl load "$HOME/Library/LaunchAgents/cx.pow.powd.plist" | |
sudo launchctl load /Library/LaunchDaemons/cx.pow.firewall.plist | |
elif [ $1 = "stop" ] | |
then | |
echo "stopping..." | |
launchctl unload "$HOME/Library/LaunchAgents/cx.pow.powd.plist" | |
sudo launchctl unload /Library/LaunchDaemons/cx.pow.firewall.plist | |
fi | |
} | |
# Quickly evaluate erlang expressions | |
function erlval() { | |
erl -eval $1 -noshell -s init stop | |
} | |
function safesleep() { | |
if [ ! ${1} ] | |
then | |
sudo pmset -a hibernatemode 3 | |
sudo nvram "use-nvramrc?"=true | |
elif [ $1 = "enable" ] | |
then | |
sudo pmset -a hibernatemode 3 | |
sudo nvram "use-nvramrc?"=true | |
elif [ $1 = "disable" ] | |
then | |
sudo pmset -a hibernatemode 0 | |
sudo nvram "use-nvramrc?"=false | |
fi | |
} | |
################################################################################ | |
# Options | |
# history: | |
setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!) | |
setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session | |
setopt extended_history # save each command's beginning timestamp and the duration to the history file | |
setopt hist_ignore_all_dups # If a new command line being added to the history | |
# list duplicates an older one, the older command is removed from the list | |
setopt hist_ignore_space # remove command lines from the history list when | |
# the first character on the line is a space | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=5000 | |
SAVEHIST=10000 # useful for setopt append_history | |
setopt auto_cd # if a command is issued that can't be executed as a normal command, | |
# and the command is the name of a directory, perform the cd command to that directory | |
setopt extended_glob # in order to use #, ~ and ^ for filename generation | |
# grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) -> | |
# -> searches for word not in compressed files | |
# don't forget to quote '^', '~' and '#'! | |
setopt longlistjobs # display PID when suspending processes as well | |
setopt notify # report the status of backgrounds jobs immediately | |
setopt hash_list_all # Whenever a command completion is attempted, make sure | |
# the entire command path is hashed first. | |
setopt nohup # and don't kill them, either | |
# setopt auto_pushd # make cd push the old directory onto the directory stack. | |
setopt nonomatch # try to avoid the 'zsh: no matches found...' | |
setopt nobeep # avoid "beep"ing | |
setopt pushd_ignore_dups # don't push the same dir twice. | |
setopt noglobdots # * shouldn't match dotfiles. ever. | |
setopt long_list_jobs # List jobs in long format | |
################################################################################ | |
# Application settings | |
# Kiji settings | |
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_HEAP_FREE_MIN=500000 | |
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/ | |
export SCALA_HOME=/usr/local/Cellar/scala/2.9.1 | |
export PATH=$PATH:$SCALA_HOME/bin | |
# Avoid errors with things uncompatable with LLVM | |
export CC=/usr/bin/gcc-4.2 | |
# Vim keybindings | |
#bindkey -v | |
# z setup | |
. `brew --prefix`/etc/profile.d/z.sh | |
function precmd () { | |
z --add "$(pwd -P)" | |
} | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
https://github.com/brucespang/dotfiles
No comments:
Post a Comment