Skip to content

Instantly share code, notes, and snippets.

@stereosupersonic
Created February 4, 2010 08:00
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 stereosupersonic/294441 to your computer and use it in GitHub Desktop.
Save stereosupersonic/294441 to your computer and use it in GitHub Desktop.
every ruby
def every seconds, &block
while true
yield
sleep seconds
end
end
class Fixnum
def minutes
self * 60
end
end
##
every 5.Minutes do
msg = "Es sind schon wieder 5 Minuten vorbei!"
title = "Hallo"
system "growlnotify -m \"#{msg}\" -t \"#{title}\""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment