Last active
November 26, 2016 10:44
-
-
Save is8r/10520478 to your computer and use it in GitHub Desktop.
.zshrcの設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="/usr/local/bin:$PATH" | |
export PATH="/usr/local/heroku/bin:$PATH" | |
export PATH=/usr/local/share/npm/bin:$PATH | |
export PATH=$HOME/local/node/bin:$PATH | |
export PGDATA=/usr/local/var/postgres | |
export PATH=$HOME/.rbenv/bin:$PATH | |
export PATH="/Applications/android-sdk/tools:$PATH" | |
export PATH="$HOME/Library/Android/sdk/platform-tools:$PATH" | |
#export ADBHOST=192.168.11.14 | |
eval "$(rbenv init -)" | |
#export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules | |
#[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc | |
export PYENV_ROOT=${HOME}/.pyenv | |
if [ -d "${PYENV_ROOT}" ]; then | |
export PATH=${PYENV_ROOT}/bin:$PATH | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
fi | |
#alias | |
alias g='git' | |
#alias gi='git init && git add . && git commit -m "first commit"' | |
alias gi='git init && git commit --allow-empty -m "first commit"' | |
alias gic='git add -A && git commit -a' | |
alias gicm='git add -A && git commit -a -m' | |
alias gife='git fetch origin && git reset --hard origin/master' | |
alias r='rails' | |
alias bi="bundle install" | |
alias gu="gulp" | |
alias pi="pod install" | |
alias be="bundle exec" | |
alias bem="bundle exec middleman" | |
alias bemb="bundle exec middleman build" | |
alias bemd="bundle exec middleman build && bundle exec middleman deploy" | |
alias rs='rails server -b 0.0.0.0' | |
alias gs="grunt server" | |
alias py="python" | |
alias pys="python -m SimpleHTTPServer" | |
alias phps="php -S localhost:8000" | |
alias sq='mysql.server' | |
alias sqs='mysql.server start' | |
alias sqrs='mysql.server start && rs' | |
alias pgs="pg_ctl -l /usr/local/var/postgres/server.log start" | |
alias pgstop="pg_ctl -D /usr/local/var/postgres stop -s -m fast" | |
alias pgrs='pg_ctl -l /usr/local/var/postgres/server.log start && rs' | |
alias hex='hexo server --draft' | |
alias hexg='hexo generate' | |
alias migrate="rake db:migrate" | |
alias op='open -a Google\ Chrome' | |
alias op3="op http://localhost:3000/" | |
alias op31="op http://localhost:3010/" | |
alias op32="op http://localhost:3024/" | |
alias op45="op http://localhost:4567/" | |
alias op4="op http://localhost:4000/" | |
alias op8="op http://localhost:8000/" | |
alias op8080="op http://localhost:8080/" | |
alias opw="op http://vccw.dev/" | |
alias rbv="rbenv versions" | |
alias opz="open ~/.zshrc" | |
alias re="source ~/.zshrc" | |
alias restart="exec $SHELL" | |
alias path="echo $PATH" | |
alias npmi="npm install --save-dev" | |
alias hide="defaults write com.apple.finder CreateDesktop -boolean false&&killall Finder" | |
alias show="defaults delete com.apple.finder CreateDesktop&&killall Finder" | |
alias chrome="open -a /Applications/Google\ Chrome.app --args -allow-file-access-from-files" | |
## zsh integration: any command that takes longer than 3 seconds | |
## https://gist.github.com/syui/7112389/raw/growl.zsh | |
## http://qiita.com/kazuph/items/3bfdfce6b7d02b43bf4d | |
alias pong='perl -nle '\''print "display notification \"$_\" with title \"Terminal\""'\'' | osascript' | |
preexec() { | |
zsh_notify_cmd=$1 | |
zsh_notify_time=`date +%s` | |
} | |
precmd() { | |
if (( $? == 0 )); then | |
# message | |
zsh_notify_status=done\!\! | |
else | |
zsh_notify_status=fail | |
fi | |
if [[ "${zsh_notify_cmd}" != "" ]]; then | |
# time | |
if (( `date +%s` - ${zsh_notify_time} > 3 )); then | |
echo ${zsh_notify_cmd} ${zsh_notify_status} | pong | |
fi | |
fi | |
zsh_notify_cmd= | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment