CMD Run
1
# Get IP address
2
ipconfig getifaddr en0 | pbcopy
3
​
4
# Get macOS version
5
defaults read loginwindow SystemVersionStampAsString | pbcopy
6
​
7
# Flash DNS Cache
8
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
9
​
10
# Rebuild launch services
11
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user
12
​
13
# List all commands installed in $PATH
14
print -l $commands
15
​
16
# List all commands/aliases installed in $PATH
17
whence -m \*
18
​
19
# List all commands/aliases/functions installed in $PATH
20
print -rl - ${(k)builtins} ${(k)functions} ${(k)commands}
21
​
22
# Switch to root user on Linux
23
sudo su -
24
​
25
# Get current process PID
26
echo $
27
​
28
# Reset launchpad
29
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
30
​
31
# List GPG secret keys
32
gpg --list-secret-keys --keyid-format LONG
33
​
34
# List GPG keys
35
gpg --list-keys
36
​
37
# Restart nginx with systemctl
38
sudo systemctl restart nginx
39
​
40
# Symlink source dir of Alfred workflow (https://gist.github.com/deanishe/35faae3e7f89f629a94e)
41
workflow-install -s -source
42
​
43
# List all processes running
44
ps aux
45
​
46
# Print exit code of last command ran
47
echo $?
48
​
49
# See all aliases assigned
50
alias
51
​
52
# List VSCode installed packages
53
code --list-extensions
Copied!
Last modified 1yr ago
Copy link