-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy path.aliases
53 lines (44 loc) · 1.75 KB
/
.aliases
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
# config
alias dot='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
# sudo
alias sudo='sudo '
# latex
alias rmtex='rm -f *.aux *.dvi *.lis *.log *.blg *.bbl *.toc *.idx *.ind *.ilg *.thm *.out *.fdb_latexmk *.fls *.synctex.gz *.nav *.snm'
# ssh tunneling
alias ssh-tunnel='ssh -v -N -D 8080'
alias ssh-vpn="ssh -o ProxyCommand='nc -X 5 -x 127.0.0.1:5000 %h %p'"
# vpn
# alias tvb='sudo route add -net 202.126 -interface ppp0'
# sudo route add -net 202.82.200 -interface ppp0'
# misc - shared with linux
PS_COMMAND="ps ax -o user,pid,pcpu,pmem,nice,stat,cputime,etime,command"
alias nps="$PS_COMMAND"'|awk '"'"'NR==1||$3>0.5'"'"'|if [[ -t 1 ]];then (cat | cut -c 1-$COLUMNS);else cat;fi'
alias dps='docker ps -a --format "table {{.Names}}\t{{.ID}}\t{{.Status}}"'
alias cleanscreen='screen -ls | sed '"'"'1d;$d'"'"' | awk '"'"'{print $1}'"'"' | xargs -I{} screen -S {} -X quit'
alias pip-upgrade='pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U'
alias rsync="rsync -av --exclude \".*\""
[[ "$(uname)" != "Darwin" ]] && alias ls='ls --color=auto'
alias ll='ls -alhFv'
alias la='ls -AFv'
alias l='ls -Fv'
alias h=history
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias R='R --no-save'
alias r='radian'
alias r-devel='radian --r-binary /usr/local/opt/r-x11/bin/R'
alias p='ipython'
alias j='julia'
alias jnb='jupyter notebook'
alias jlab='jupyter lab'
# local mac only
# alias brew="env PATH=${PATH//$(pyenv root)\/shims:/} brew"
# alias rs="open 'http://localhost:8787'; rstudio-server;"
alias tm='tmux-manager'
# for replace newline symbol
alias fle="perl -pi -e 's/\r\n?/\n/g' "
# otool
[[ "$(uname)" == "Darwin" ]] && alias ldd="otool -L"
[ -z $ZSH_VERSION ] && return
# zsh alias