Monday, December 14, 2009

Getting wired and wireless working on ubuntu 9.0.4

by sandipransing 0 comments
It might be the case that earlier wireless was working and then it stopped working
Follow the simple steps here....
1. Restart networking
sudo /etc/init.d/networking restart
2. Disable the "Support for Atheros 802.11 wireless LAN cards" on system/administration/Hardware Drivers, and reboot your box.
3. Restart
sudo reboot

That's it, Cheers! Still having problem follow the instructions here
Read More…

Wednesday, December 2, 2009

Hpricot scraping in ruby

by sandipransing 1 comments
Include gems/library required before getting started
require 'hpricot'
require 'net/http'
require 'rio'
# Pass website url to be scraped
url = "www.funonrails.com"

# Define filename to store file locally
file = "temp.html"
# Save page locally
rio(url) < rio (file)
# Open page through hpricot
doc = Hpricot(open(file))

Apply hpricot library to get right contents

doc.at("div.pageTitle")
doc/"div.pageTitle"
doc.search("div.entry")
doc//"div.pageTitle"
Hpricot API Reference click here
Read More…

About The Author

Sandip is a ruby on rails developer based in pune and also a blogger at funonrails. Opensource contributor and working with Josh software Private Limited. for more info read Follow Sandip on Twitter for updates.

Connect With Me...

Github Projects

@sandipransing Twitter