Last active
August 29, 2015 13:56
-
-
Save youpy/9185559 to your computer and use it in GitHub Desktop.
Disable sleep (for OS X)
This file contains hidden or 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
reuire 'mac-robot' | |
r = Mac::Robot.new | |
loop { | |
# 0xff is not listed in <HIToolbox/Events.h>, so it doesn't affect user's interaction | |
# http://forums.macrumors.com/showpost.php?p=8428116&postcount=2 | |
r.key_press(0xff) | |
sleep 60 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment