-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
98 lines (83 loc) · 2.13 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="muse"
plugins=(git)
source $ZSH/oh-my-zsh.sh
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:phantomjs-2.1.1-macosx/bin"
# misc shortcut
alias siri='say hey siri;say '
alias h='history'
alias hg='history|grep'
alias s='source ~/.zshrc'
alias z='vim ~/.zshrc'
# vim
alias v='nvim'
alias gv='cd ~/.local/share/nvim'
alias vinit="vim ~/.config/nvim/init.vim"
alias rv='rm -f ~/.local/share/nvim/view/*'
# tokyo aws
alias tokyo='ssh -i tokyo_need_for_speed.pem ubuntu@54.199.254.225'
alias tt='ssh -i tokyo_need_for_speed.pem -D 2001 -f -C -q -N ubuntu@54.199.254.225' # ssh tunneling vpn
# npm & yarn
function r = {
tmp=`git ls-files|grep yarn.lock`
if [ $? -eq 0 ]; then
yarn run local
else
npm run local
fi
}
function i = {
tmp=`git ls-files|grep yarn.lock`
if [ $? -eq 0 ]; then
yarn install
else
npm i
fi
}
function t = {
tmp=`git ls-files|grep yarn.lock`
if [ $? -eq 0 ]; then
yarn t
else
npm t
fi
}
# webpack
export WEBPACK_HAPPY_CACHE_ENABLED=1
export WEBPACK_BREAKPOINT_DISABLED=1
export WEBPACK_HAPPY_THREAD_SIZE=4
export WEBPACK_HARD_SOURCE_ENABLED=1
# git shortcuts
alias d='git checkout develop'
alias p='git pull'
alias rh='git reset HEAD --hard'
alias rhd='git reset HEAD --hard;git checkout develop'
alias gl="git log --format='%Cgreen%h%Creset %C(cyan)%an%Creset - %s' --graph"
alias gl2="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
function push = {
local currentBranchName="$(git branch | grep \* | cut -d ' ' -f2)"
git push origin ${currentBranchName}
}
alias gs="git status"
alias am="git add .;git commit -m "
# tree
alias dl="tree -d -L 1"
alias dl2="tree -d -L 2"
alias dl3="tree -d -L 3"
alias l="tree -L 1"
alias l2="tree -L 2"
alias l3="tree -L 3"
# tmux
alias yo="zsh ~/yoyogi.sh"
alias ta='tmux attach'
# ruby
export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"
fi
export PATH="~/bin:${PATH}"
# zsh
HISTFILE=~/.zsh_history
HISTSIZE=999999999
SAVEHIST=$HISTSIZE