Skip to content

Instantly share code, notes, and snippets.

View robertokl's full-sized avatar

Roberto Klein robertokl

  • Hoverinc
  • San Francisco, CA, USA
View GitHub Profile
require 'rubygems'
require 'net/https'
uri = URI.parse("https://auth.locaweb.com.br/login")
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = (uri.scheme == 'https')
https.verify_mode = (OpenSSL::SSL::VERIFY_PEER)
raw_res = https.start do |conn|
conn.get("#{uri.path}?#{uri.query}")
end
require 'rubygems'
require 'mechanize'
class AgressivometroNotifier
q = 0
while(true) do
agent = Mechanize.new
agent.get('http://173.203.109.223/')
c = agent.page.images.find_all {|i| i.src == "images/bomb2.png"}.count
if q != c