Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (64 sloc) 1.94 KB
# Ignore basic commands in the history
alias ls=' ls -FG'
alias l=' ls -laFG'
alias cd=' cd'
# Tmux helpers
alias ts=' tmux list-sessions'
alias td='tmux detach'
# Config helpers
alias vi='vim'
alias vrc='vi $HOME/.vimrc'
alias za='vi $HOME/.zsh_aliases; source $HOME/.zsh_aliases'
alias zrc='vi $HOME/.zshrc; source $HOME/.zshrc'
# Global aliases
alias -g 2l=' 2>&1 | less'
alias -g gp='| grep -i'
# Env manipulation
alias cover='export COVERAGE=true && echo "Set COVERAGE=true"'
alias uncover='unset COVERAGE && echo "Unset COVERAGE"'
alias o0='export OPT=0 && echo "Set OPT=0"'
alias o3='export OPT=3 && echo "Set OPT=3"'
# General helpers
alias b='bundle exec'
alias br='bundle exec rspec'
alias g='git'
alias r='rake'
alias rr='rake clean && rake'
function mcd {
mkdir $1 && cd $1
}
alias alert='terminal-notifier -message Ping!'
alias ttr='touch tmp/restart.txt'
alias valgruby='valgrind --trace-children=yes'
alias glocal='git ls-files --others | grep -v -e node_modules -e .bundle -e coverage -e ".o$"'
function bak {
mv $1 $1.bak
}
alias mochall='mocha --recursive test'
alias jurl='curl -H "Content-type: application/json"'
function jv {
cat "$1" | python -m json.tool | less
}
alias fix-vbox='sudo /Library/StartupItems/VirtualBox/VirtualBox restart'
function colors-for-tmux {
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\t"
done
}
alias s='bin/spring'
function y {
cat "$1" | pbcopy
}
# Update helpers
alias au='sudo apt-get update -y && sudo apt-get upgrade -y'
alias bu='brew update && brew upgrade'
alias d='docker'
alias dc='docker-compose'
alias dm='docker-machine'
alias dr='docker-compose run --rm'
alias ddev='eval "$(docker-machine env dev)"'
alias dprod='eval "$(docker-machine env sarah)"'
alias drails='docker-compose run web rails'
alias space='/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.8/Emacs.app/Contents/MacOS/Emacs.sh'
alias du=' du -shLc'
alias flushdns='dscacheutil -flushcache; sudo killall -HUP mDNSResponder'