Terminal Crib Sheet

Reset Launchpad

defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock

Reset Notification Center Widgets

defaults delete com.apple.notificationcenterui widgets;killall NotificationCenter

Reset Dock icon cache

sudo find /private/var/folders/ -name 'com.apple.dock.iconcache' -delete;killall Dock

Disabling System Integrity Protection from macOS Recovery

csrutil disable

Hide Privacy Indicators from macOS Recovery

system-override suppress-sw-camera-indication-on-external-displays=on
BetterDisplay

Kill Control Center

while true; do pkill "ControlCenter"; sleep 0.1; done

Toggling systemstatusd

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.systemstatusd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.systemstatusd.plist

Toggling Control Center

launchctl unload -w /System/Library/LaunchAgents/com.apple.controlcenter.plist
launchctl load -w /System/Library/LaunchAgents/com.apple.controlcenter.plist

Disabling Quarantine (macOS Catalina and earlier)

defaults write com.apple.LaunchServices LSQuarantine -bool false

Disabling Translocation (macOS Ventura and earlier)

defaults write -globalDomain LSDisableTranslocation -bool true

Disabling Apple Mobile File Integrity Kernel Extension

sudo nvram boot-args="amfi_get_out_of_my_way=0x1 ipc_control_port_options=0 -arm64e_preview_abi"

Don't Re-open Closed Windows

defaults write -g ApplePersistenceIgnoreState true

Disabling iTunes Auto Backup

defaults write com.apple.iTunes DeviceBackupsDisabled -bool YES

Toggle Finder Show/Hide Hidden Files

defaults write com.apple.finder AppleShowAllFiles YES
defaults write com.apple.finder AppleShowAllFiles NO

Download Best Quality Youtube MP4

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' [Link to Video]

Convert TS to MP4 with ffmpeg

ffmpeg -i input.ts -acodec copy -vcodec copy out.mp4
ffmpeg -i input.mp4 -vn -c:a copy output.m4a

Apps

Sogou Pinyin
Sublime Text

Windows 10

%localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
Ren *.* *.jpg