Skip to content

Instantly share code, notes, and snippets.

@pasangsherpa
Created January 19, 2015 06:46
Show Gist options
  • Select an option

  • Save pasangsherpa/86b84121887222be7ba3 to your computer and use it in GitHub Desktop.

Select an option

Save pasangsherpa/86b84121887222be7ba3 to your computer and use it in GitHub Desktop.
Aliases
alias d='cd ~/Documents'
alias p='cd ~/Documents/personal'
alias w='cd ~/Documents/work'
alias o='cd ~/Documents/open-source'
alias ~='cd ~'
#go up any number of directories. eg: '. 3' goes up 3 parent directories, '.' or '. 1' goes up 1 directory
function . {
for i in `seq ${1-1}`; do
cd ..;
done
}
alias l='ls'
alias la='ls -la'
alias ll='ls -l'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\''' #list directories tree structure
alias sh='defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder' #show hidden files
alias hh='defaults write com.apple.finder AppleShowAllFiles -boolean false; killall Finder' #hide hidden files
alias al='alias | grep'
#use find and grep to search recursively for a string in files. eg: grepit "some string" "filetype"; grepit " " *.html;
grepit(){
find . -name "*${2}" -print | xargs grep -nir "${1}"
}
alias brd='brew doctor'
alias bru='brew update'
alias plog='parse log -f'
alias s1='python -m SimpleHTTPServer 8001'
alias s2='python -m SimpleHTTPServer 8002'
alias s3='python -m SimpleHTTPServer 8003'
alias s4='python -m SimpleHTTPServer 8004'
alias b='nano ~/.bashrc'
alias br='source ~/.bash_profile'
alias c='cd'
alias h='history|grep'
alias m='mocha'
alias ip='ifconfig|grep "inet "'
alias gs='git status'
alias gd='git diff'
alias gp='git push'
alias gu='git pull'
alias gl='git log'
alias gc='git clone'
function gi() {
curl https://www.gitignore.io/api/"$@" > .gitignore;
}
alias nt='npm test'
alias np='npm publish'
alias nrb='npm run build'
alias nrc='npm run cover'
alias nrr='npm run report'
alias ni='npm install'
alias nis='npm install --save'
alias nisd='npm install --save-dev'
alias nig='npm install -g'
alias nd='node-debug'
alias nm='nodemon'
alias ndm='node-debug node_modules/.bin/_mocha'
alias nu='npm update'
alias nug='npm update -g'
alias ns='npm start'
alias bi='bower install'
alias bu='bower update'
alias bug='bower install -g'
alias bis='bower install --save'
alias bisd='bower install --save-dev'
alias bp='bower register'
alias gr='grunt'
alias grb='grunt build'
alias grbs='grunt build:stage'
alias grbp='grunt build:production'
alias grds='grunt deploy:stage'
alias grdp='grunt deploy:production'
alias gub='gulp build'
alias gur='gulp release'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment