Friday, February 16, 2007

Gnome Startup Programs Bug

If you specify additional startup programs through the Gnome Sessions application, and your changes won't save, it is likely that "~/.config/autostart" has the wrong file ownership. Sometimes installation of Beagle will screw things up.

To correct:
sudo chown -R username:username /home/username/.config

Friday, February 09, 2007

Ruby HTTPS with HTTP Basic Auth

Fetching HTTPS data with Ruby using HTTP Basic Authorization

require 'net/http'
require 'net/https'

def get_feed(server,path,username,password)
http = Net::HTTP.new(server,443)
req = Net::HTTP::Get.new(path)
http.use_ssl = true
req.basic_auth username, password
response = http.request(req)
return response.body
end