Skip to content

Instantly share code, notes, and snippets.

@joemaller
Created April 1, 2016 19:01
Show Gist options
  • Select an option

  • Save joemaller/76628a43120c56f3f6cdc15af49baf51 to your computer and use it in GitHub Desktop.

Select an option

Save joemaller/76628a43120c56f3f6cdc15af49baf51 to your computer and use it in GitHub Desktop.
prank shell script, plays hamster dance YouTube loud. Sadly can't deal with headphones
#!/usr/bin/env bash
osascript -e "set Volume 10"
open "https://www.youtube.com/watch?v=6WpMlwVwydo"
osascript -e 'if application "Google Chrome" is running then' -e'tell app "System Events" to set visible of process "Google Chrome" to false' -e 'end'
osascript -e 'if application "Safari" is running then' -e'tell app "System Events" to set visible of process "Safari" to false' -e 'end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment