Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

172 lines (126 sloc) 6.303 kB
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbles"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git osx)
# Disable buggy setting of window title (messes up output of date command)
DISABLE_AUTO_TITLE="true"
source $ZSH/oh-my-zsh.sh
# zsh options
unsetopt correct_all
# Customize to your needs...
export LSCOLORS="exfxcxdxbxegedabagacad"
export LS_COLORS='di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:*.py=00;32:'
# Allow color escape sequences in pager
export LESS=-r
# Handy shortcuts
alias pdb="python -m pdb"
alias install="brew install"
alias installh="brew install --HEAD"
# Limit number of columns in output to size of terminal
alias linelen='cut -c -$COLUMNS'
# Start a web server in this directory
alias webserver="python -m SimpleHTTPServer 2>/dev/null 1>/dev/null &"
# Parse and pretty-print JSON
alias json="python -m json.tool"
alias xml="xmllint --format -"
# Get outer IP address for this machine
alias ip="curl robutils.appspot.com/ip/"
# Run python unittest suite
alias unittest="python -m unittest discover"
# Check email using Mailgun API
function emailcheck { curl -s -G --user 'api:pubkey-5ogiflzbnjrljiky49qxsiozqef5jxp7' -G https://api.mailgun.net/v2/address/validate --data-urlencode address="$1" | json }
# directory shortcuts
alias ll="ls -l"
alias la="ls -a"
alias cdd="cd -"
# Make vim always open in tabs and in the same window
#alias mvim="mvim --remote-silent -p"
alias vim="vim -p"
# unnecessary masochism
alias sls="sl"
alias celar="sl"
alias clera="sl"
alias clr="clear"
# Process commands
alias findp="pgrep -lf"
alias killp="pkill -f"
# Make node REPL less of a PITA
alias inode="env NODE_NO_READLINE=1 rlwrap -p Green -S \"node >>> \" node"
alias ls="ls --color=auto"
# VCS editors
export EDITOR="vim"
export SVN_EDITOR="vim --noplugin"
# Dumps all HTTP traffic from Airport
alias monitorhttp="sudo tcpdump -A -i en1 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --color=auto -e '(GET)|(POST)' -e '^'"
# Fixes rake arguments (like rake new_post[title] for octopress)
alias rake="noglob rake"
# Youtube music download in highest quality
alias youtube-dl-music="youtube-dl --extract-audio --audio-quality 0 --audio-format m4a --title "
# Show all listening TCP sockets and the processes that opened them
alias servers="sudo lsof -i tcp -s tcp:listen"
alias sshaws="ssh -i ~/.ssh/rewardsden.pem -l ec2-user"
# Fix VirtualBox kernel driver
alias virtualbox="sudo /Library/StartupItems/VirtualBox/VirtualBox start"
# Link MAMP document root to current directory (MAMP needs to be configured to point to ~/mamp_root
alias mamp_here="rm ~/mamp_root && ln -sf \`pwd\` ~/mamp_root"
# URL encoding and decoding
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
# virtualenv auto-activate and autorun scripts in directories
source $HOME/dotfiles/scripts/virtualenv-auto-activate.sh
source $HOME/dotfiles/scripts/autorun.sh
# Completion for AWS CLI
source $HOME/dotfiles/scripts/aws_zsh_completer.sh
# vi mode with vim-like backspace
bindkey -v
bindkey "^H" backward-delete-char
bindkey "^?" backward-delete-char
# History search on up-down
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey "^R" history-beginning-search-backward
bindkey "^A" vi-beginning-of-line
bindkey "^E" vi-end-of-line
bindkey -M viins 'jj' vi-cmd-mode
# Use bash help
function help { bash -c "help $1" }
# Get size of file from web server
function filesize { curl -I $1 | grep Content-Length: }
# Make a directory and cd to it
function mcd { mkdir $1 && cd $1 }
# Git style diff with colordiff
function cdiff {
if hash colordiff 2>/dev/null; then
colordiff -u "$@"
else
env diff "$@"
fi
}
# Auto-start tmux
#[[ $TERM != "screen-256color" ]] && tmux && exit
if [ -f $HOME/.zsh_profile ];
then
source $HOME/.zsh_profile
fi
# Use direnv to automatically load environment vars from .envrc in each directory
eval "$(direnv hook zsh)"
# RVM
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Jump to Line
Something went wrong with that request. Please try again.