2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-15 12:12:58 +00:00
steffen-dotfiles/zsh/aliases

102 lines
3.4 KiB
Plaintext
Raw Normal View History

2014-06-24 12:59:40 +00:00
# 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
2013-07-19 17:17:05 +00:00
# Easier navigation: .., ..., ~ and -
alias ~="cd ~"
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
2014-11-19 11:08:43 +00:00
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
2014-06-24 12:59:40 +00:00
# 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
2014-12-16 17:21:41 +00:00
# clipper -- https://github.com/wincent/clipper
alias clip="nc localhost 8377"
2014-06-24 12:59:40 +00:00
# gnu coreutils
alias ls="gls -al --color=auto"
alias l='gls -al --color=auto'
2013-07-19 17:17:05 +00:00
# Gitty gitgit
alias g="git"
2014-09-19 16:08:36 +00:00
alias gf="git-flow"
2015-03-01 15:47:26 +00:00
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)'
2013-07-19 17:17:05 +00:00
alias gsmu='git submodule init && git submodule update'
2014-02-22 16:44:20 +00:00
alias gsmuu='git submodule foreach git pull origin master'
2013-09-03 16:26:14 +00:00
alias gsvn='git checkout master && git svn fetch && git merge dev && git svn rebase && git svn dcommit'
2016-05-02 08:15:21 +00:00
alias ggall='git remote | xargs -L1 git push --all'
alias gmo='$EDITOR $(git ls-files -m)'
# aliases for apache and mysql
alias nginxstart='sudo brew services start nginx'
alias nginxstop='sudo brew services stop nginx'
alias mysqlstart='brew services start mariadb'
alias mysqlstop='brew services stop mariadb'
alias phpstart='brew services start php70'
alias phpstop='brew services stop php70'
alias dev='nginxstart && mysqlstart && phpstart'
alias devs='nginxstop && mysqlstop && phpstop'
alias devr='devs && dev'
2013-07-19 17:17:05 +00:00
# tmux
alias t='tmux -u -2'
alias ta='tmux attach'
# all in one homebrew, gem update commands
2015-06-05 12:39:13 +00:00
alias brewup='brew update && brew upgrade --all && brew cleanup && brew linkapps'
2014-07-18 17:06:11 +00:00
alias npmup='npm -g cache clean && npm -g update'
2013-12-04 10:51:06 +00:00
alias sysup='sudo softwareupdate -i -a'
alias upall='sysup && brewup && npmup'
2013-07-19 17:17:05 +00:00
2015-01-22 13:55:23 +00:00
# other often used stuff
alias npmre='rm -rf node_modules && npm cache clean && npm install'
2013-07-19 17:17:05 +00:00
# easy hosts / apache / php editing
2013-12-04 10:51:06 +00:00
alias hosts='sudo vim /etc/hosts'
alias vhosts='vim /usr/local/etc/nginx/servers/'
2013-07-19 17:17:05 +00:00
# often used folder shortcuts
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"
2014-10-16 17:04:18 +00:00
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# imagemagick downsampling shortcuts (c&p retina folder, run, done!)
2016-05-25 20:41:19 +00:00
alias jpegoptim='for i (*.jpg) mozjpeg -copy none -optimize -scans ~/dotfiles/other/scans.txt -outfile $i $i'
alias jpg25='mogrify -format jpg -resize 25% -strip -quality 80 *.jpg'
alias jpg50='mogrify -format jpg -resize 50% -strip -quality 80 *.jpg'
alias png25='mogrify -format png -resize 25% -strip -quality 80 *.png'
alias png50='mogrify -format png -resize 50% -strip -quality 80 *.png'
alias gallery='mogrify -format jpg -resize 2280x2280 -strip -quality 80 *.jpg'
2016-06-28 08:01:12 +00:00
alias anigif='convert -delay 12 -loop 0 *.jpg animated.gif'