|
|
|
# make aliases and other stuff work in sudo
|
|
|
|
alias sudo='sudo '
|
|
|
|
|
|
|
|
# always use macvim but for 'vim'
|
|
|
|
alias vim=$EDITOR
|
|
|
|
alias vi=$EDITOR
|
|
|
|
alias v=$EDITOR
|
|
|
|
alias vd=$EDITOR -d
|
|
|
|
|
|
|
|
# Easier navigation: .., ..., ~ and -
|
|
|
|
alias ~="cd ~"
|
|
|
|
alias ..='cd ..'
|
|
|
|
alias ...='cd ../..'
|
|
|
|
alias ....='cd ../../..'
|
|
|
|
alias .....='cd ../../../..'
|
|
|
|
alias q='exit'
|
|
|
|
|
|
|
|
# fasd
|
|
|
|
alias a='fasd -a' # any
|
|
|
|
alias s='fasd -si' # show / search / select
|
|
|
|
alias d='fasd -d' # directory
|
|
|
|
alias f='fasd -f' # file
|
|
|
|
alias sd='fasd -sid' # interactive directory selection
|
|
|
|
alias sf='fasd -sif' # interactive file selection
|
|
|
|
alias z='fasd_cd -d' # cd, same functionality as j in autojump
|
|
|
|
alias zz='fasd_cd -d -i' # cd with interactive selection
|
|
|
|
|
|
|
|
# suffix-aliases for file-types (zsh only)
|
|
|
|
alias -s css=vim
|
|
|
|
alias -s scss=vim
|
|
|
|
alias -s js=vim
|
|
|
|
alias -s html=vim
|
|
|
|
alias -s md=vim
|
|
|
|
alias -s txt=vim
|
|
|
|
|
|
|
|
# clipper -- https://github.com/wincent/clipper
|
|
|
|
alias clip="nc localhost 8377"
|
|
|
|
|
|
|
|
# gnu coreutils
|
|
|
|
alias ls="gls -al --color=auto"
|
|
|
|
alias l='gls -al --color=auto'
|
|
|
|
|
|
|
|
# Gitty gitgit
|
|
|
|
alias g="git"
|
|
|
|
alias gf="git-flow"
|
|
|
|
alias gs="git status"
|
|
|
|
alias gst="git status"
|
|
|
|
alias ggpl='git pull origin $(current_branch)'
|
|
|
|
alias ggps='git push origin $(current_branch)'
|
|
|
|
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
|
|
|
|
alias gsmu='git submodule init && git submodule update'
|
|
|
|
alias gsmuu='git submodule foreach git pull origin master'
|
|
|
|
alias gsvn='git checkout master && git svn fetch && git merge dev && git svn rebase && git svn dcommit'
|
|
|
|
alias gmo='$EDITOR $(git ls-files -m)'
|
|
|
|
|
|
|
|
# aliases for apache and mysql
|
|
|
|
alias apachestart='sudo apachectl start'
|
|
|
|
alias apachestop='sudo apachectl stop'
|
|
|
|
alias mysqlstart='mysql.server start'
|
|
|
|
alias mysqlstop='mysql.server stop'
|
|
|
|
alias dev='apachestart && mysqlstart'
|
|
|
|
alias devs='apachestop && mysqlstop'
|
|
|
|
alias devr='devs && dev'
|
|
|
|
|
|
|
|
# tmux
|
|
|
|
alias t='tmux -u -2'
|
|
|
|
alias ta='tmux attach'
|
|
|
|
|
|
|
|
# all in one homebrew, gem update commands
|
|
|
|
alias brewup='brew update && brew upgrade --all && brew cleanup && brew linkapps'
|
|
|
|
alias gemup='gem update --system && gem update && gem cleanup'
|
|
|
|
alias npmup='npm -g cache clean && npm -g update'
|
|
|
|
alias sysup='sudo softwareupdate -i -a'
|
|
|
|
alias upall='sysup && brewup && gemup && npmup'
|
|
|
|
|
|
|
|
# other often used stuff
|
|
|
|
alias npmre='rm -rf node_modules && npm cache clean && npm install'
|
|
|
|
|
|
|
|
# easy hosts / apache / php editing
|
|
|
|
alias hosts='sudo vim /etc/hosts'
|
|
|
|
alias vhosts='sudo vim /usr/local/etc/apache2/extra/httpd-vhosts.conf'
|
|
|
|
alias phpini='vim /usr/local/etc/php/5.6/php.ini'
|
|
|
|
alias httpconf='vim /usr/local/etc/apache2/httpd.conf'
|
|
|
|
|
|
|
|
# docker stuff
|
|
|
|
alias drft='docker run -it -v $(pwd)/:/code/ docker-frontend-tools'
|
|
|
|
|
|
|
|
# often used folder shortcuts
|
|
|
|
alias drop='cd ~/Dropbox && ls -al'
|
|
|
|
alias web='cd ~/Sites && ls -al'
|
|
|
|
alias rep='cd ~/Repositories && ls -al'
|
|
|
|
alias dot='cd ~/Dotfiles && ls -al'
|
|
|
|
|
|
|
|
# random usefull stuff
|
|
|
|
alias dnsflush='sudo dscacheutil -flushcache'
|
|
|
|
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
|
|
|
|
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
|
|
|
|
|
|
|
# imagemagick downsampling shortcuts (c&p retina folder, run, done!)
|
|
|
|
# http://www.imagemagick.org/Usage/filter/nicolas/#downsample
|
|
|
|
alias jpg25='mogrify -format jpg -resize 25% -strip -interlace Plane -filter LanczosRadius -quality 90 *.jpg'
|
|
|
|
alias jpg50='mogrify -format jpg -resize 50% -strip -interlace Plane -filter LanczosRadius -quality 90 *.jpg'
|
|
|
|
alias png25='mogrify -format png -resize 25% -strip -interlace Plane -filter LanczosRadius -quality 90 *.png'
|
|
|
|
alias png50='mogrify -format png -resize 50% -strip -interlace Plane -filter LanczosRadius -quality 90 *.png'
|
|
|
|
alias gallery='mogrify -format jpg -resize 2280x2280 -strip -interlace Plane -filter Lanczos -quality 90 *.jpg'
|