-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
47 lines (38 loc) · 1.39 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
if [[ "$OSTYPE" == "darwin"* ]]; then
alias ls="ls -G"
alias chrome="Google\ Chrome"
else
alias ls="ls --color=auto"
fi
# allows for `cd ....`
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g ......='../../../../..'
alias ll="ls -l"
alias la="ls -la"
alias rg="rg --ignore-case --hidden --max-columns 1000 --max-columns-preview"
alias k="kubectl"
alias rp="rsync -ah --info=progress2"
alias mkdirs="mkdir -p"
alias gcm="git checkout master && git pull origin"
alias genpasswd="head -c 200 /dev/urandom | shasum | base64 | head -c 32 ; echo"
alias ebprod="eb status app-production | awk '\$2 == \"Version:\" {print \$3}'"
alias pacman="sudo pacman"
alias vim=nvim
alias :e=vim
alias ipython="python -m IPython"
alias fixwifi="sudo ifconfig en0 down; sudo ifconfig en0 up"
alias awslocal="AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=${DEFAULT_REGION:-$AWS_DEFAULT_REGION} aws --endpoint-url=http://${LOCALSTACK_HOST:-localhost}:4566"
# mitmproxy() {
# networksetup -setwebproxystate wi-fi on
# networksetup -setsecurewebproxystate wi-fi on
# command mitmproxy
# networksetup -setwebproxystate wi-fi off
# networksetup -setsecurewebproxystate wi-fi off
# }
prunehist() {
grep -v ".\{${1:-200}\}" $HISTFILE > ${HISTFILE}_new
echo $(grep -c ".\{${1:-200}\}" $HISTFILE) entries removed
mv ${HISTFILE}_new $HISTFILE
}