Archive for the 'Ruby' Category

Automated battery monitor

Woot is all charged up over 4/1.
Antidote:

#!/usr/bin/ruby

require “hpricot”
require “open-uri”

def growl ( title, message )
system “growlnotify”, “-m”, message, “-t”, title
end

while (1)
begin
doc = Hpricot( open(”http://www.woot.com/”) )
item = (doc/”h3#ctl00_ContentPlaceHolder_TitleHeader”).text
[…]


About

You are currently browsing the Cocoa & Medicine weblog archives for the Ruby category.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Categories