TED gives Africans free laptops

I just found this article from TED. It seems like they are really committed to bringing technology to Africa:


TED and the sponsors behind the conference made an amazing commitment to including innovative young African leaders, thinkers and entrepreneurs into the TED Global conference. Of the 450 attendees at the conference, 100 are “fellows”, here through the generosity of GE, Google and AMD. That generosity took an unexpected extra step this morning, when TED staffer Tom Reilly announced to the assembled fellows that Google and AMD would be donating a new Mac or PC laptop to all fellows, and that Noah Samara from Worldspace would be giving each fellow a satellite radio and an annual subscription.


And it seems like William has now been elevated to celebrity status:


William Kamkwamba, the amazing young Malawian engineer who built his first windmill at age 14, has captured the imagination of many of the people in the crowd. A number of TED attendees have banded together to support him fiscally to complete his high school education and go onto university. A TED staffer is travelling to Malawi next week to start working on finding tutors for William to help prepare him to attend a top high school in Malawi.

Some members of my blogging community, including Ndesanjo Macha, have committed to coaching William… and critically, in coaching TED on how to provide William with help and support without overwhelming him or uprooting him from his family or community. Friends like Ndesanjo have had the experience of growing up in rural communities and moving to huge cities to pursue their education - I hope that he can help TED support William in a way that’s as constructive as possible.

Malawian windmill maker gets standing ovation at TED

Remember William Kamkwamba and his homemade Windmill made from bicycle parts?

After I made that post, Emeka Okafor invited William to attend the TED conference in Tanzania. Soyapi (who is also there) just irc'd me to say that William gave a presentation and received a standing ovation. People like Bono, Larry Page, and lots of other movers and shakers are there.

Congratulations to William!

Finding where ubuntu installs programs

Whenever you install something in Ubuntu it unpacks a .deb file and saves it in the right location. The problem is that I never know the contents of a given package and where each file will end up on my machine.

The answer is dpkg -L .

So for instance, I just did:

apt-get install ktouch

and then used

dpkg -L ktouch

to figure out where the tutorial file got saved to.

(Ktouch is a typing program - we just had a little competition in the office to determine who gets what swag from the OpenMRS conference I just attended.)

How to record and convert real audio streams to mp3

I came up with this one a long time ago - its a nice little hack. It requires mplayer (and the right codecs) and lame. It might work on windows if you have cygwin installed. It should work with any type of stream that mplayer can play, not just real audio streams.

This approach uses a fifo virtual file to make sure that you don’t waste disk space storing raw audio data. It just pushes the audio data into the fifo, and lame pulls it out all asynchronously.


mkfifo soundpipe
lame -b 64 soundpipe filename.mp3 & mplayer -quiet -ao pcm -aofile soundpipe URL_OF_STREAM

Lighttpd on ubuntu

Lighttpd is a great web server. It manages resources frugally, and still manages to be fast. If you have a dedicated super duper server, lighttpd is probably not for you. But perhaps you need your machine to do more than just be a web server, or perhaps you are using a virtual dedicated server (vds, vps, whatever they are called - I use slicehost which is great and inexpensive) which means you have a limited amount of ram and cpu. In that case, lighttpd is a great choice for your web server. The main downside, is that it isn't quite as plug and play as apache is. Apache pretty much runs php out of the box, and installing phpmyadmin just works. There are plenty of guides for getting rails to work with lighttpd, but I couldn't find anything very useful for lighttpd and php (especially with fast-cgi). At any rate, I figured out how to set it in Ubuntu (dapper) and figured I would pass share the experience:

Install php with fast-cgi and lighttpd


sudo apt-get install php4-cgi lighttpd
sudo lighty-enable-mod (then select fast_cgi)

sudo gedit /etc/lighttpd/conf-enabled/10-fastcgi.conf


And change the port line to be this instead: (this seems to be a bug in the default ubuntu configuration)

socket => "/tmp/php.socket"


Now restart lighttpd

sudo /etc/init.d/lighttpd reload


Final step: Take over world


Get phpmyadmin to work with lighttpd
(The following steps assume that you have done part 1 properly)

sudo apt-get install phpmyadmin php4-mysql
sudo gedit /etc/lighttpd/lighttpd.conf


And add an alias for phpmyadmin


alias.url = ("___invalid .... other stuff here
"/phpmyadmin/" => "/usr/share/phpmyadmin" # this is the line to add
)


Reload the server:
sudo /etc/init.d/lighttpd force-reload


(might also need to edit /etc/php.ini and enable mysql, but it might happen automatically too)

Quick and dirty debug logging in ruby on rails

Typically I just to render :text=> "Yo the value is #{debug_me}" and return

But sometimes this doesn't work. Maybe you are in a model file, or a method that gets returned to another method. If that is the case you can always get some debug by raising an exception:

raise "Yo the value is#{debug_me}"

Since exceptions can come from anywhere this will always works. There are other options, like using logger which works pretty well too - but raising an exception is a nice debug hack for your toolkit.

Malawi birding sites

(All directions are from Lilongwe unless mentioned otherwise)

Ntchisi Forest Reserve covers Ntchisi Mountain (1,655 m), with
some of the best evergreen forest in the Liongwe area. To reach Ntchisi
Forest from Lilongwe, take the M1 north towards Kasungu and turn right
after about 25 km on to the M19 passing west of Dowa towards Ntchisi
boma. Alternatively, in the dry season, turn right at Mponela on the
D87. South of Ntchisi there are two sings to Ncchisi rest house. Follow
the second northern sign turning right on the toad to the rest house,
over high plateau grassland for a further 16 km. (According to “Day
Outings from Lilongwe by WESM).

Kutti Game Reserve – Take the Lilongwe/Salima road. About 10 km
before Salima, you will see a sign for the reserve. In addition to the
grasslands and palm savannah, there is a pond covered in lily pads

Lifuwe Rice Scheme - Take the Lilongwe/Salima road. Continue pass
Salima. At the sign with a smiling face and at the corner of the
military airfield, turn left. Continue for 15 plus kilometers. A good
place to see Collared (Red-Winged) Pratincole. On route, you cross over
a bridge. You can bird to the left in the Palm Savanah or carry on to
the right and follow a thin path to Safari Beach Club (next to the
Livingstone Hotel)

Mpatsanjoka Dambo - (outside of Salima) - A large marsh land
between Salima and Senga Bay. Accessible from road leading to Hippo Pools.

Thuma Forest Reserve – Take the Lilongwe/Salima road. Keep your
eye open for the power plant on the left. The turn off is on the right
hand-side. Black-bellied Bustard seen in this area.
Dzalanyma Forest Reserve - Premiere miombo woodlands. Contains a number
of Malawi endemics. Take the road through Likuni and pass the Lilongwe
Sailing Club. For more directions to the Dzalanyma Forest Lodge, visit
Land and Lakes Safari.

Chongoni Forest Reserve (Dedza) - Hilltop reserve behind Forestry
College.

Bembeke Dambo- Go pass Dedza and turn left at Bembeke (sits on a
turn on the M1). Turn a sharp left at the stores. If you are confused
ask for the Bembeke Mission. Continue down the road about 1 – 2 km. On
your right hand side, you will see a low lying wetlands.

Lilongwe Sailing Club – Take the Likuni Road pass Likuni and
follow the dirt road for about 30 minutes outside of town to the turn
off on the left with a sign for Lilongwe Sailing Club.


Other highlights of Malawi

Mt Mulanje National Park - Plateau holds a unique niche for
tropical, alpine ecosystem. A number of tea estates have received
outstanding marks for neighboring birding areas.

Nykia National Park - Beautiful rolling hills that will remind
you of Ireland. Endemic species can be found along with rarities like
the Wattled Crane. Isolated woodlands house a number of local rarities.

Liwonde National Park - One of the jewels of the national park
system of Malawi and a highlight of birding.

Majete Wildlife Reserve – Contains escarpment and mixed
woodlands. Managed by African Parks.

Lengwe National Park – Prime example of deciduous tickets and forest.

Lake Chilwa – Large reservoir of resident and waterfowl birds.
WESM/Zomba conducts regular birding trips on Saturday. WESM can be 01524
700 or 01526 212.

Zomba Forest Reserve – Behind Zomba Boma.