-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zsh_aliases
47 lines (40 loc) · 2.18 KB
/
.zsh_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
# NOTE: aliases for zsh by esod
alias ls='ls --color=auto'
# NOTE: aliases.
# save time, save the world!
alias ducks='du -cks * | sort -rn | head'
alias largefolders='du -hsx * | sort -rh | head'
alias largefiles1='find . -type f -size +1M -exec du -h '{}' + | sort -hr | head'
alias largefiles2='find . -printf "%s %p\n"| sort -nr | head'
alias publicip='dig +short myip.opendns.com @resolver1.opendns.com'
alias flushdns='sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache'
alias remove_ds="find . -type f -name '*.DS_Store' -ls -delete"
alias httpd='python -m SimpleHTTPServer 8000 & open -a "Google Chrome" http://localhost:8000'
alias httpds='/Users/esod/github/esodesod/public-scripts/bash/httpds-with-caddy.sh'
#alias docker-dev='export DOCKER_HOST=tcp://vch-dev.esod.local:2376 DOCKER_TLS_VERIFY=1'
# alias docker-unset='unset DOCKER_HOST DOCKER_TLS_VERIFY'
alias topcpu='top -stats pid,command,cpu,idlew,power -o power -d'
# NOTE: me, just being (really) lazy, sometimes.
alias esx-11='ssh [email protected]'
alias esx-12='ssh [email protected]'
alias esx-13='ssh [email protected]'
alias esx-14='ssh [email protected]'
alias esx-21='ssh [email protected]'
alias esx-22='ssh [email protected]'
alias esx-23='ssh [email protected]'
alias esx-rpi-01='ssh [email protected]'
alias esx-rpi-02='ssh [email protected]'
alias vc='ssh [email protected]'
alias vc-01='ssh [email protected]'
alias vc-02='ssh [email protected]'
alias route66='sudo route -n add -net 10.0.1.0/24 192.168.100.1 && sudo route -n add -net 192.168.1.0/24 192.168.100.1'
alias takemehome='sudo route -n add -net 10.0.1.0/24 192.168.1.1 && sudo route -n add -net 10.1.1.0/24 192.168.1.1 && sudo route -n add -net 10.2.1.0/24 192.168.1.1'
# fzf searching with bat preview
# function .s { grep -Ril "$1" | fzf --bind='F2:toggle-preview' --preview 'bat --style=numbers --color=always --line-range :500 {}'; }
#export -f .s
# ibrew
alias ibrew="arch -x86_64 /usr/local/bin/brew"
# cat to bat
[[ ! -f /usr/bin/bat ]] || alias cat="bat -p"
[[ ! -f /usr/bin/batcat ]] || alias cat="batcat -p"
[[ ! -f /opt/homebrew/bin/bat ]] || alias cat="bat -p"