Posts

Showing posts from 2009

Getting the sound to work on Ubuntu Jaunty

After installing Ubuntu 9.04 (jaunty) on my new HP DV6-1280us machine, my main problem was that the sound is complete dead. I see no errors when I try to play anything. there is just no sound. taking a closer look at my Sound Card: ~$ lspci | grep -i audio 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) 01:00.1 Audio device: ATI Technologies Inc R700 Audio Device [Radeon HD 4000 Series] After a while of googling around, I came across this post on ubuntu forums If you have the same sound card. (which is in most DV6, DV7 series of HP) This will probably be useful to you as well. Briefly, you'll need to download, compile and install the alsa driver. and modify configuration of alsa-base.conf as follows: wget -c ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2 wget -c ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.21.tar.bz2 wget -c ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.21.tar.bz2 tar xvf alsa-driver-1.0.21.tar.bz2 tar xvf alsa-lib-1.0...

Presenting NeverBlcok in rubykaigi 2009

Mohammad Ali's presentation of NeverBlock .

Patron: a Ruby HTTP client library

I was just trying out Patron , the new ruby client library, by Phillip Toland . Patron is based on libcurl. and providing nice usable interface, which allows you to make http requests easily and with as much customization as you need. Let us take a quick usage sample here: irb(main):036:0> require 'rubygems' => false irb(main):037:0> require 'patron' => false irb(main):038:0> sess = Patron::Session.new => #<Patron::Session:0xb7a9f878> irb(main):039:0> sess.base_url = "http://www.google.com" => "http://www.google.com" irb(main):040:0> resp = sess.get("/intl/en/about.html") => #<Patron::Response @status_line='HTTP/1.0 200 OK'> irb(main):041:0> puts resp.body Checkout the documentation for more samples and usage notes.

problems connecting to yahoo server with pidgin under ubuntu

Few days ago I noticed that pidgin is unable to connect to my yahoo account. I decided to have a look at the matter and realized that Yahoo has changed the way of the authentication as part of upgrading their software. pidgin released a new version that uses the new method (2.5.7). so I had to upgrade my 2.5.2 to the latest version. There was something wrong when i tried to follow the instructions on pidgin website. So I went to downloading the source code , following the instuctions in the INSTALL file to compile, build and install pidgin. I needed also to upgrade libpurple to 2.5.7 by: apt-get remove --purge libpurple0 apt-get install libpurple0 Finally, I was able to connect to my yahoo account :)

goosh.org The unofficial google shell

As a linux user, I spend most of my time using the shell to do most of the work. I am a command line fan like a lot of people out there. goosh.org is a command line based (Ajax web based) interface for google, created by Stefan Grothkopp . You just write your search query and the results will be listed for you in a very similar manner to command line programs. Searching using goosh will still need you to use your mouse to open the results and continue browsing. Not a very suitable shell mode. Well, this haven't been the main usage of goosh (for me). Instead, I have been using it heavily as my translator. Instead of: Going to http://translate.google.com/ in the browser Writing the text to be translated Choosing the from/to languages from the drop down lists Clicking "Translate" Goosh lets you get this by: Going to goosh.org typing the command following command and hitting Enter translate src dst sentence for example: translate en ar my name is mahmoud to get "اسمي...

Adding Custom Routes for Radiant Projects

While integrating simple_captcha into the guestbook extension of radiant, I had to add a special route for the simple_captcha to work properly. Unfortunately, the routes file of a radiant project does nothing but loading the routes file from radiant gem itself: load File.join(RADIANT_ROOT, "config", "routes.rb") Calling ActionController::Routing::Routes.draw again will clear all the routes that have been defined in the gem routes file. So you have to either modify the code of the gem, or copy the code from routes.rb of the gem radiant to the projects route file. Or you can append your new routes using add_named_route instead of draw . And since the simple captcha route is supposed to be defined before radiant routes. you can manipulate the routes array as in the last line of the following sample. load File.join(RADIANT_ROOT, "config", "routes.rb") ActionController::Routing::Routes.add_named_route(        'simple_captcha',        '/...