-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
52 lines (43 loc) · 959 Bytes
/
.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
# useful
alias ll="ls -alCFh"
alias ls="ls -lCF"
alias c="clear"
alias h="history"
alias hg="history|grep"
alias extip="curl eth0.me"
alias dog="cat"
alias wget="wget -c"
alias c="clear"
alias bc="bc -l"
alias mount="mount |column -t"
alias spoofdpi="~/.spoof-dpi/bin/spoof-dpi"
alias ovpn="sudo openvpn --script-security 2 --config"
alias mkdir="mkdir -pv"
# confirmation #
alias mv="mv -i"
alias cp="cp -i"
alias ln="ln -i"
# colors
alias ip="ip -c"
alias dmesg="dmesg --color=always -T"
alias fdisk="fdisk --color=always"
alias pcregrep="pcregrep --color=always"
alias watch="watch --color"
alias diff="diff --color=always"
alias vdir="vdir --color=always"
# human readable
alias df="df -h"
alias du="du -h"
alias rsync="rsync -h"
alias systemctl="systemctl --no-pager --full"
# functions
urlencode ()
{
local args="$@"
jq -nr --arg v "$args" '$v|@uri';
}
urldecode ()
{
local url_encoded="${1//+/ }"
printf '%b' "${url_encoded//%/\\x}"
}