Useful Commands/MacOS only

From Fundamental Ramen
Jump to navigation Jump to search
TODO Command
Optimize Screen Capture
# Save screen capture into ~/Pictures/Screenshots
defaults write com.apple.screencapture \
  location ~/Pictures/Screenshots

# Disable shadow
defaults write com.apple.screencapture \
  disable-shadow -bool true

# Apply
killall SystemUIServer
Open text file using GitHub Atom
(Need to reboot after written)
defaults write com.apple.LaunchServices/com.apple.launchservices.secure \
  LSHandlers -array-add \
  '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.github.atom;}'
Get ID of an application
osascript -e 'id of app "Atom"'
Open Finder and select the file
open -R something.txt
Write NTFS
df -h
umount /dev/disk3s1
sudo mkdir /Volumes/WinToGo
sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk3s1 /Volumes/WinToGo
cd /Volumes/WinToGo
cp -R ~/Downloads/WindowsSupport/* .