-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathalias.bashrc
More file actions
74 lines (65 loc) · 1.84 KB
/
alias.bashrc
File metadata and controls
74 lines (65 loc) · 1.84 KB
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
alias cda='cd ..'
alias cdb='cd ../..'
alias cdc='cd ../../..'
alias cdd='cd ../../../..'
alias cde='cd ../../../../..'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias s='sudo -H '
alias sudo='sudo -H'
alias v='vim'
alias h='history'
alias j='jobs -l'
alias l='ls -lh '
alias lss='ls -Slh'
alias gsr='grep -srn'
alias nau='nautilus .'
alias gsrl='grep -srnl'
alias ntpl='netstat -ntpl'
alias mkdir='mkdir -pv'
alias mount='mount |column -t'
# from pkufranky
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# add commandlinefu
cmdfu(){ curl "http://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; }
alias cf='cmdfu'
#set -o vi
alias sv='set -o vi'
alias se='set -o emacs'
alias tailf='tail -f'
# tmux config
# new session with name zstmux
alias tmc='tmux new -s zstmux'
# attach it to background
# Ctrl+c D
# goback to the session
alias tmg='tmux attach -t zstmux'
alias tmp='cd /tmp'
# alias for python
alias py='python'
alias py2='python2'
alias py3='python3'
alias his='history'
alias proxycomposer='proxychains composer'
alias cps='proxychains composer'
alias mao='oneko -fg red -tofocus &'
alias wgets='aria2c -x 16'
function perf {
echo "Direct:"
curl -o /dev/null -s -w "%{time_total}\n" "$1"
echo "Proxy:"
curl --socks5-hostname 127.0.0.1:1080 -o /dev/null -s -w "%{time_total}\n" "$1"
}
function p {
netstat -an|grep 'tcp\|udp'|awk '{print $4}'|cut -d : -f 2|sed '/^$/d'|sort|uniq -c|awk '$1 > 2{print $0}'
}
#git
alias gitauthor='git log|grep Author|sort -rn|uniq -c|sort -n'
alias gita='git add'
alias gits='git status'
alias gitd='git diff'
alias gitl='git log'
alias wendu='sensors'