Table of Contents


Encrypted Disk Images

– via Apple Support and Eclectic Light Company

ImageMagick Commands

Convert pngs or heics to jpegs.

# Convert png to jpg, with 95% quality, while stripping any metadata
convert -strip -quality 95% <source>.png <destination>.jpg

# Convert HEIC to jpg, with 99% quality
mogrify -quality 99 -format jpg IMG_8672.HEIC
mogrify -quality 99 -format jpg *.HEIC

Disable Narrow Tabs in Safari 14

  1. Make sure you have enabled website icons, via Preferences -> Tabs -> Show website icons in tabs
  2. Quit Safari
  3. Allow Full Disk Access for Terminal, via System Preferences -> Security & Privacy -> Privacy -> Full Disk Access
  4. Open Terminal and run defaults write com.apple.Safari IncludeInternalDebugMenu 1
  5. Start Safari
  6. Open the new Debug menu and unselect Debug -> Tab Features -> Narrow Tabs
  7. Enjoy the old, sane tab behavior
  8. (Optional) You can disable the menu afterwards by running defaults write com.apple.Safari IncludeInternalDebugMenu 0 in Terminal.
  9. (Recommended) Remove Full Disk Access for Terminal via System Preferences -> Security & Privacy -> Privacy -> Full Disk Access

– via Reddit and Yuriy Shiryaev

Install ffmpeg with libvpx-vp9 support (for webm conversion)

Commands such as brew install ffmpeg --with-libvpx don’t work anymore, I’ve found that simply installing libvpx with Homebrew and then reinstalling ffmpeg will work.

brew install libvpx
brew uninstall ffmpeg
brew install ffmpeg

# Check available encoders
ffmpeg -encoders

Some info here too.

Convert gifs to mp4/webm

ffmpeg -i my-animation.gif my-animation.mp4

ffmpeg -i my-animation.gif -c vp9 -b:v 0 -crf 41 my-animation.webm

– via Google Developers

Download one or more files to your local machine via SSH

Use scp.

# Download single file
local> scp username@host.com:/path/to/dir/file local/path 

# Download directory recursively
local> scp -r username@host.com:/path/to/dir local/path 

– via Stack Overflow

Create a script that runs over SSH

ssh <your-server> << EOF
    echo "Hello world"
    echo "This is where your script should be"
EOF

– via Amit Chaudhary

Alfred cheatsheet

https://www.alfredapp.com/help/getting-started/cheatsheet/

iTerm: remove the right arrow to the left of the prompt

It’s the Marks feature. Disable it from Preferences -> Profiles -> <your profile> -> Terminal -> Shell integration -> Show mark indicators -> Off

– via Stack Overflow

iTerm useful shortcuts

Whitelist a site in any Safari content blocker

Look for the site in Safari -> Preferences -> Websites -> Content Blockers, set content blocking to Off