-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
48 lines (38 loc) · 1.27 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
48
alias rly="sudo !!"
alias sha256sum="shasum -a256"
grin() { grep -r -i $1 -n $2 }
alias rack="ack --ruby"
alias fixdns="sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist && sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist"
alias fixcamera="sudo killall VDCAssistant"
function upgradecasks() { for cask in `brew cask list`; do brew cask install $cask; done }
function brewyolo() { brew update; brew upgrade --all; upgradecasks }
alias git=hub
who-is-listening() {
if [ $# -eq 0 ]; then
sudo lsof -iTCP -sTCP:LISTEN -n -P
elif [ $# -eq 1 ]; then
sudo lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1
else
echo "Usage: who-is-listening [pattern]"
fi
}
## direnv
if command -v direnv &> /dev/null; then
alias dea="direnv allow"
alias der="direnv reload"
fi
## remake
if command -v remake &> /dev/null; then
compdef remake="make"
fi
## kubectl
if command -v kubectl &> /dev/null; then
source <(kubectl completion zsh)
alias k="kubectl"
compdef k="kubectl"
fi
## Audit Electron apps
audit-electrons() {
find /Applications -type f -name "*Electron Framework*" -exec \
sh -c "echo \"{}\" && strings \"{}\" | grep '^Chrome/[0-9.]* Electron/[0-9]' | head -n1 && echo " \;
}