Skip to content

Instantly share code, notes, and snippets.

@weiland
Created May 12, 2016 13:16
Show Gist options
  • Save weiland/a4f30f2f02ba6f607d0e6338836c3bae to your computer and use it in GitHub Desktop.
Save weiland/a4f30f2f02ba6f607d0e6338836c3bae to your computer and use it in GitHub Desktop.
leave_work.sh - scripts to run when leaving work on evenings. finish all tasks and close software. make the mac ready to bring it home.
#!/bin/sh
# TODO(pascal): Get TM status and ask to stop backup. (Also prevent disk ejection below)
# stops current time machine backup
tmutil stopbackup
# eject all disks
osascript -e 'tell application "Finder" to eject (every disk whose ejectable is true)'
# find and kill node/npm processes
# find and kill rails processes
# is everything committed and pushed?
# close vim
# close terminal
# close postgresql/mysql/redis/couchdb
# close webbrowser
# close slack
# close mail
# stop spotify
# shutdown mac? (I know, most people laugh at me for shutting down a mac)
# at the begin: Make sure to have entered the worklog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment