Skip to content

Instantly share code, notes, and snippets.

@nelson-o
Created May 29, 2014 10:48
Show Gist options
  • Select an option

  • Save nelson-o/168ea9a42669124e2f4a to your computer and use it in GitHub Desktop.

Select an option

Save nelson-o/168ea9a42669124e2f4a to your computer and use it in GitHub Desktop.

Revisions

  1. nelson-o created this gist May 29, 2014.
    37 changes: 37 additions & 0 deletions .nelson_alias
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    # nelson aliases
    alias vim='mvim -v'
    alias vgi="vim .gitignore"
    alias zp="vim ~/.zprofile"
    # rails dev
    alias poc="powder open -b 'chromium'"
    alias single_quote="grep \' -r --include=\*.{rb,erb}"
    alias be="bundle exec"
    alias ber="bundle exec rake"
    alias bec="bundle exec cap"
    # git
    alias git=hub
    alias gt="git today"
    alias gbo="git browse -u | xargs open -a 'chromium' "

    alias -g ...="../.."
    alias -g ....="../../.."
    alias -g G='| grep -i'

    alias -s rb='vim'
    alias -s erb='vim'
    alias -s js='vim'
    alias -s scss='vim'
    alias -s zip='unzip'

    # techbang
    red(){
    # pass a pure number or use git branch as issues tracker
    # techbang use tXXXXX as issue branch, so the 't' needs to be removed
    if [ -n "$1" ]; then
    tic=$1
    else
    tic=`git rev-parse --abbrev-ref HEAD`
    fi
    server='https://redmine.techbang.com/issues/'
    open -a 'chromium' $server${tic:1}
    }