Useful Commands/MacOS only: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
|- | |- | ||
| Optimize Screen Capture || | | Optimize Screen Capture || | ||
< | <syntaxhighlight lang="bash"> | ||
# Save screen capture into ~/Pictures/Screenshots | # Save screen capture into ~/Pictures/Screenshots | ||
defaults write com.apple.screencapture \ | defaults write com.apple.screencapture \ | ||
| Line 14: | Line 14: | ||
# Apply | # Apply | ||
killall SystemUIServer | killall SystemUIServer | ||
</ | </syntaxhighlight> | ||
|- | |- | ||
| Open text file using GitHub Atom<br>(Need to reboot after written) || | | Open text file using GitHub Atom<br>(Need to reboot after written) || | ||
< | <syntaxhighlight lang="bash"> | ||
defaults write com.apple.LaunchServices/com.apple.launchservices.secure \ | defaults write com.apple.LaunchServices/com.apple.launchservices.secure \ | ||
LSHandlers -array-add \ | LSHandlers -array-add \ | ||
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.github.atom;}' | '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.github.atom;}' | ||
</ | </syntaxhighlight> | ||
|- | |- | ||
| Get ID of an application || | | Get ID of an application || | ||
< | <syntaxhighlight lang="bash"> | ||
osascript -e 'id of app "Atom"' | osascript -e 'id of app "Atom"' | ||
</ | </syntaxhighlight> | ||
|- | |- | ||
| Open Finder and select the file || | | Open Finder and select the file || | ||
< | <syntaxhighlight lang="bash"> | ||
open -R something.txt | open -R something.txt | ||
</ | </syntaxhighlight> | ||
|- | |- | ||
| Write NTFS || | | Write NTFS || | ||
< | <syntaxhighlight lang="bash"> | ||
df -h | df -h | ||
umount /dev/disk3s1 | umount /dev/disk3s1 | ||
| Line 41: | Line 41: | ||
cd /Volumes/WinToGo | cd /Volumes/WinToGo | ||
cp -R ~/Downloads/WindowsSupport/* . | cp -R ~/Downloads/WindowsSupport/* . | ||
</ | </syntaxhighlight> | ||
|} | |} | ||
Latest revision as of 20:27, 3 April 2025
| 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/* .
|