Skip to content

Instantly share code, notes, and snippets.

@andrei4002
Forked from clyfe/bf.ro
Last active December 29, 2015 01:09
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 andrei4002/7590841 to your computer and use it in GitHub Desktop.
Save andrei4002/7590841 to your computer and use it in GitHub Desktop.
#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