-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
43 lines (35 loc) · 1.41 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
# Unix
alias tlf="tail -f"
alias ln='ln -v'
alias mkdir='mkdir -p'
alias ...='../..'
alias l='ls'
alias ll='ls -al'
alias lh='ls -Alh'
alias -g G='| rg'
alias -g M='| less'
alias -g L='| wc -l'
alias -g ONE="| awk '{ print \$1}'"
alias e="$EDITOR"
alias v="$VISUAL"
# Pretty print the path
alias path="echo $PATH | tr -s ':' '\n' | sort"
# Navigation
alias zshconfig="e ~/.zshrc"
alias zshenv="e ~/.zshenv.local"
alias zshlocal="e ~/.zshrc.local"
alias zshsource="source ~/.zshrc"
alias dotfiles='cd ~/dotfiles'
alias lg="lazygit"
alias jq="gojq"
alias yless="jless --yaml"
# This kills a process that slows down my Mac every once in a while...??
alias killn="ps -ax | grep notifyd | head -1 | awk '{print \$1}' | sudo xargs kill"
# kill a rogue process running on a specific port
# usage: `killp 3000`
killp() { lsof -n "-i4TCP:${1:-3002}" | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9}
# Utilities for MacOS
alias show-file='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide-file='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias keyboard-disable='sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/'
alias keyboard-enable='sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/'