-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bash_aliases
69 lines (47 loc) · 1.91 KB
/
.bash_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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
alias fucking='sudo !!'
alias cpz='rsync -aP'
alias ls='ls --color=auto'
alias ll='ls -la | lolcat'
alias vim='nvim'
alias mntdisas="sshfs -o idmap=user,follow_symlinks disasterbate: /srv/disas"
alias umntdisas="fusermount -u /srv/disas"
alias vpndisas="sudo systemctl start openvpn@arch"
alias vpnoff="sudo systemctl stop openvpn@arch"
alias wiki="cd ~/dev/_wiki/docs/"
alias pacin='sudo pacman -S'
alias eqz='alsamixer -D equal'
bind Space:magic-space
gcm() {
git commit -m"`curl -s http://quote.escapethebot.net`"
}
function cs () {
cd "$@" && ls
}
function scratch {
vim ~/tmp/$(openssl rand -base64 10 | tr -dc 'a-zA-Z').txt
}
function weather () {
curl -s wttr.in/$1 |sed -n 1,6p
}
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
# IP addresses
alias wanip="dig +short myip.opendns.com @resolver1.opendns.com"
# Enhanced WHOIS lookups
alias whois="whois -h whois-servers.net"
alias gpgsign="gpg --clearsign"
# View HTTP traffic
alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
hgrep() {
history | grep "$1"
}
authy() {
chrome --profile-directory=Default --app-id=gaedmjdfmmahhbjefcbgaolhhanlaolb
}