Created
January 29, 2015 07:09
-
-
Save nWidart/ee60cf0b7f6a60697e5d 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
# Aliases in this file are bash and zsh compatible | |
# Don't change. The following determines where YADR is installed. | |
yadr=$HOME/.yadr | |
# YADR support | |
alias yav='yadr vim-add-plugin' | |
alias ydv='yadr vim-delete-plugin' | |
alias ylv='yadr vim-list-plugin' | |
alias yup='yadr update-plugins' | |
alias yip='yadr init-plugins' | |
# PS | |
alias psa="ps aux" | |
alias psg="ps aux | grep " | |
alias psr='ps aux | grep ruby' | |
# Moving around | |
alias cdb='cd -' | |
# Show human friendly numbers and colors | |
alias df='df -h' | |
alias ll='ls -alGh' | |
alias ls='ls -Gh' | |
alias du='du -h -d 2' | |
# show me files matching "ls grep" | |
alias lsg='ll | grep' | |
# Alias Editing | |
alias ae='vim $yadr/zsh/aliases.zsh' #alias edit | |
alias ar='source $yadr/zsh/aliases.zsh' #alias reload | |
# vim using | |
mvim --version > /dev/null 2>&1 | |
MACVIM_INSTALLED=$? | |
if [ $MACVIM_INSTALLED -eq 0 ]; then | |
alias vim="mvim -v" | |
fi | |
# vimrc editing | |
alias ve='vim ~/.vimrc' | |
# zsh profile editing | |
alias ze='vim ~/.zshrc' | |
alias zr='source ~/.zshrc' | |
# Git Aliases | |
alias gs='git status' | |
alias gstsh='git stash' | |
alias gst='git stash' | |
alias gsp='git stash pop' | |
alias gsa='git stash apply' | |
alias gsh='git show' | |
alias gshw='git show' | |
alias gshow='git show' | |
alias gi='vim .gitignore' | |
alias gcm='git ci -m' | |
alias gcim='git ci -m' | |
alias gci='git ci' | |
alias gco='git co' | |
alias gcp='git cp' | |
alias ga='git add -A' | |
alias guns='git unstage' | |
alias gunc='git uncommit' | |
alias gm='git merge' | |
alias gms='git merge --squash' | |
alias gam='git amend --reset-author' | |
alias grv='git remote -v' | |
alias grr='git remote rm' | |
alias grad='git remote add' | |
alias gr='git rebase' | |
alias gra='git rebase --abort' | |
alias ggrc='git rebase --continue' | |
alias gbi='git rebase --interactive' | |
alias gl='git l' | |
alias glg='git l' | |
alias glog='git l' | |
alias co='git co' | |
alias gf='git fetch' | |
alias gfch='git fetch' | |
alias gd='git diff' | |
alias gb='git b' | |
alias gbd='git b -D -w' | |
alias gdc='git diff --cached -w' | |
alias gpub='grb publish' | |
alias gtr='grb track' | |
alias gpl='git pull' | |
alias gplr='git pull --rebase' | |
alias gps='git push' | |
alias gpsh='git push' | |
alias gnb='git nb' # new branch aka checkout -b | |
alias grs='git reset' | |
alias grsh='git reset --hard' | |
alias gcln='git clean' | |
alias gclndf='git clean -df' | |
alias gclndfx='git clean -dfx' | |
alias gsm='git submodule' | |
alias gsmi='git submodule init' | |
alias gsmu='git submodule update' | |
alias gt='git t' | |
alias gbg='git bisect good' | |
alias gbb='git bisect bad' | |
alias gch='git checkout' | |
alias gmandp='gch master && gm develop && gps && gch develop && gps' | |
alias gmp='gch master && gm develop && gps && gch develop && gps' | |
alias update-modules='composer update asgardcms/core-module asgardcms/menu-module asgardcms/setting-module asgardcms/user-module asgardcms/workshop-module asgardcms/page-module asgardcms/dashboard-module && ga && gcm "updating modules"' | |
# Common shell functions | |
alias less='less -r' | |
alias tf='tail -f' | |
alias l='less' | |
alias lh='ls -alt | head' # see the last modified files | |
alias screen='TERM=screen screen' | |
alias cl='clear' | |
# Zippin | |
alias gz='tar -zcvf' | |
# Ruby | |
# alias c='rails c' # Rails 3 | |
# alias co='script/console --irb=pry' # Rails 2 | |
# alias ts='thin start' | |
# alias ms='mongrel_rails start' | |
# alias tfdl='tail -f log/development.log' | |
# alias tftl='tail -f log/test.log' | |
alias ka9='killall -9' | |
alias k9='kill -9' | |
# Gem install | |
alias sgi='sudo gem install --no-ri --no-rdoc' | |
# TODOS | |
# This uses NValt (NotationalVelocity alt fork) - http://brettterpstra.com/project/nvalt/ | |
# to find the note called 'todo' | |
alias todo='open nvalt://find/todo' | |
# Forward port 80 to 3000 | |
alias portforward='sudo ipfw add 1000 forward 127.0.0.1,3000 ip from any to any 80 in' | |
# alias rdm='rake db:migrate' | |
# alias rdmr='rake db:migrate:redo' | |
# Zeus | |
alias zs='zeus server' | |
alias zc='zeus console' | |
# Rspec | |
alias rs='rspec spec' | |
alias sr='spring rspec' | |
alias srgm='spring rails g migration' | |
alias srdm='spring rake db:migrate' | |
alias srdt='spring rake db:migrate' | |
alias srdmt='spring rake db:migrate db:test:prepare' | |
# Sprintly - https://github.com/nextbigsoundinc/Sprintly-GitHub | |
alias sp='sprintly' | |
# spb = sprintly branch - create a branch automatically based on the bug you're working on | |
alias spb="git checkout -b \`sp | tail -2 | grep '#' | sed 's/^ //' | sed 's/[^A-Za-z0-9 ]//g' | sed 's/ /-/g' | cut -d"-" -f1,2,3,4,5\`" | |
alias hpr='hub pull-request' | |
alias grb='git recent-branches' | |
# Finder | |
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
alias pp='cd ~/Sites/Personal' | |
alias art='php artisan' | |
# Composer aliases | |
alias c='composer' | |
alias cu='composer update' | |
# Vagrant aliases | |
alias v='vagrant' | |
alias vu='vagrant up' | |
alias fuck='sudo $(history -p \!\!)' | |
export MARKPATH=$HOME/.marks | |
function jump { | |
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" | |
} | |
function mark { | |
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" | |
} | |
function unmark { | |
rm -i "$MARKPATH/$1" | |
} | |
function marks { | |
\ls -l "$MARKPATH" | tail -n +2 | sed 's/ / /g' | cut -d' ' -f9- | awk -F ' -> ' '{printf "%-10s -> %s\n", $1, $2}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment