-
-
Save andrei4002/7590841 to your computer and use it in GitHub Desktop.
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
#on windows | |
#careful, it will wake up the dead too | |
require 'open-uri' | |
require 'win32/sound' | |
include Win32 | |
loop do | |
available = true | |
begin | |
sleep 1 | |
open("http://www.emag.ro/") | |
rescue OpenURI::HTTPError => e | |
available = false | |
end | |
if available | |
loop do | |
Sound.beep(2000, 1000) | |
sleep 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment