Skip to content

Instantly share code, notes, and snippets.

@kosmikko
Last active February 17, 2017 09:19
Show Gist options
  • Save kosmikko/b043b8630b38c6df8d909bb755efeb4a to your computer and use it in GitHub Desktop.
Save kosmikko/b043b8630b38c6df8d909bb755efeb4a to your computer and use it in GitHub Desktop.
OSX shell commands

Prevent sleep for 1 hour:

caffeinate -u -t 3600

Screensaver Immediate Lock

Status

defaults read com.apple.screensaver askForPasswordDelay

Enable (Default)

defaults write com.apple.screensaver askForPasswordDelay -int 0

Securely Remove File

srm /path/to/file

Restore Sane Shell

stty sane

Preview via QuickLook

qlmanage -p /path/to/file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment