Skip to content

Instantly share code, notes, and snippets.

@wzulfikar

wzulfikar/.zshrc

Last active Nov 16, 2016
Embed
What would you like to do?
# config aliases
alias so="source"
alias zshso="source ~/.zshrc"
alias zshconfig="subl ~/.zshrc"
alias sshconfig="subl ~/.ssh/config"
alias hostsconfig="subl /etc/hosts" # <- edit hosts file using sublime
alias omz="subl ~/.oh-my-zsh"
alias subl-user="open ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User"
# directory aliases
alias wproj="cd ~/web_projects"
alias proj-docs="cd ~/project_docs"
# misc aliases
alias artisan="php artisan"
alias artisan-s="php artisan serve"
alias st="open -a SourceTree"
alias gw="gulp watch"
alias swagger-ui="open /Applications/swagger-ui/index.html"
alias swagger-editor="cd /Applications/swagger-editor && npm start"
# git aliases
alias ginit="git init"
alias gpush="git push"
alias gpull="git pull"
alias gadd="git add"
alias gcommit="git commit -m"
alias gcheckout="git checkout"
alias glog="git log --oneline --graph"
# template for project alias
# name of project: my-first-web
# alias of project: mfw
alias mfw-cd="cd ~/web_projects/my-first-web"
alias mfw-subl="mfw-cd && subl ." # <- cd current dir and open in sublime
alias mfw-s="mfw-cd && artisan serve --host 0.0.0.0 --port 8001" # <- fire up dev server, in this case is laravel.
alias mfw-st="mfw-cd && st ." # <- cd current dir and open in source tree
# docker
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/strawhat/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
export DOCKER_PS_FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"
alias docker-ps='docker ps --format="$DOCKER_PS_FORMAT"'
alias dps='docker ps --format="$DOCKER_PS_FORMAT"'
alias docker-ps-all='docker ps -a --format="$DOCKER_PS_FORMAT"'
alias docker-psa=docker-ps-all
alias docker-machine-rebuild="docker-machine rm default && docker-machine create --driver virtualbox default"
alias dc="docker-compose"
alias dm="docker-machine"
# open laravel db designer in browser
alias ldesign="open http://biodesignrealworld.github.io/LaravelDatabaseDesigner/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment