Last active
October 20, 2015 17:25
-
-
Save diezguerra/134e59ffe9b377ef9cd1 to your computer and use it in GitHub Desktop.
Cagers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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