I just read that Penguin Books offers Charles Dickens' famous "A Christmas Carol" for free download on its website as an audiobook podcast.

Go ahead, download it and finally get in a christmas mood :) And be fast - it will only be there till the end of december.

(via German Zeitwissen log)

P.S.: By the way: The podcast is read with a wonderful british accent :) It's not what you hear very often around here!

Read more…

NSLU2; source: nslu2-linux yahoo groupRecently, I bought a Linksys NSLU2 network attached storage device and installed Linux on it. I have it boot over a 64 MB USB flash stick that I had to spare and I connected a ext3-formatted USB harddrive to it. It works flawlessly with Samba, serving the USB drive to all of my client OSes.

However, as I only need the USB harddrive maybe twice a day, I did not want it to run all 24/7. The main reason is, of course, that it wastes electricity, and additionally running all the time might have an unnecessary impact on the longevity of my drive. Especially because it is used only now and then.

Almost all the pages I found about this on the net mentioned that currently (and maybe forever) it is impossible to have a spindown time for USB harddrives, due to the SCSI driver emulation in the Linux kernel.

Today, however, I found an interesting thread in the nslu2-linux mailinglist. Robert Demski has provided a kernel patch as well as a binary package for the OpenEmbedded system (which is the base for the OpenSlug distro).

I managed to patch my openslug image accordingly and now USB spindown with scsi-idle works flawlessly for me with a Kernel 2.6.15-2. Once it is patched in the main images, you are good to go; If you want to build your own flash image right now, instead, here we go: <!--more-->

  • To add scsi-idle spindown functionality to the OpenSlug, we have to set up a cross-compile environment for the NSLU2 as shown on the NSLU2 Development Homepage as well as the Master Makefile documentation.
  • Unfortunately, the whole process is very, very poorly documented so that it is pretty hard to find out how to patch the kernel and simply have the flash image rebuilt. But once you get it, it's not that complicated anymore.
  • So after we got all required packages, we run make setup followed by make build-openslug-image.
  • Then we have to apply kernel-patch-scsi-idle.patch provided in the file section of the nslu2-linux yahoo group (member access only...). We find the kernel files in openembedded/packages/linux/nslu2-kernel/$version. The patch must be copied in here.
  • Now add the patch file name to the BitBake file for your kernel version: nslu2-kernel$version.bb, located in the packages/linux directory.
  • In order to have the kernel rebuilt, we have to remove some files from the stamps directory. This dir contains dummy files that indicate if a specific step was already taken by the make process. We remove the files nslu2-kernel-$version.do*, so that the whole kernel package will be patched and rebuilt.
  • Then run a make build-openslug-image again out of the cross-compile environment's base directory. It should tell you that it compiled the kernel package again and it built a new flash image.
  • You will find the flash image(s) in openslug/tmp/deploy/. Please make sure you fetch the right (newest) one as there are most likely at least two images in there.
  • With that image you can reflash your NSLU2.

Afterwards, you want to install the scsi-idle package also provided in the executables section of the nslu2-linux group. Afterwards, you can configure the idle timeouts in /etc/default/scsi-idle and start the corresponding daemon. It should spin down (and up) your hard drive as intended!

P.S.: The kernel patch will be included in the main OpenSlug images soon. Update: I also sent in a patch for the OpenEmbedded source tree in order to have the scsi-idle package available in the main tree shortly.

Read more…

Starbucks Coffee; CC licensed; src: http://www.flickr.com/photos/pyrotechnicphoenix/71464695/Yeah! The second, good espresso I found here in the U.S. was... - imagine that - the one at Starbucks coffee (downtown Corvallis).

Usually, these coffee chains really suck at making good coffee. For example, Seattle's Best Coffee that's sold all over Portland (ridiculously, a Washington coffee in an Oregon city), was really not much of an enlightenment.

However, a German friend of mine (who usually knows what he is talking about when it comes to coffee) told me that Starbucks really makes a difference. Not having a Starbucks in my home city in Germany, I was quite excited: A coffee shop chain that doesn't suck?

And, ya, what can I say: The one-shot espresso at Starbucks rocks - even though it is served in a way too big paper cup and the clerk looks kind of strangely when you say, yes, I really only want a one-shot espresso. The price of 1,35 is still at least twice as much as in Italy, but considering that Italy is quite a few miles away, it is certainly worth the money.

Starbucks++ :)

Read more…

We are using DB_DataObjects as the database abstraction layer for Maintain. It's a pretty convenient way to access databases, in most cases preventing you from writing ugly SQL strings at all. So far, so good.

However, when handling lots of database entries (in my case a couple of ten thousands), you might easily run into PHP's memory limit. Imagine the following scenario:

$books = DB_DataObject::Factory('books'); $books->type = 'novel'; $books->find(); while ($books->fetch()) {     do_something(); }

It will magically query your database for you, taking some memory for caching and, when you made your way through all of the returned records (what should actually happen at some time, considering that you have got a while clause here), it should destroy the cached information, setting the memory free that was used for it.

It does not.

Imagine the above code sample being inside another while() statement. It will start constantly leaking memory until it runs into PHP's memory limit. In my case, the script finally took 56 Megs of space.

The solution is to run $books->free() after you've iterated through the records, even though the associated man page claims: "DataObjects stores result sets as a private global variable, normally this is free'ed after you have run through the results, or at the end of the request.".

By that, I cut down the memory usage of my script to barely 3 1/2 megs. Sweet! :)

Update: Bug filed. Update 2: The bug was fixed and a new, stable release is available now. Go ahead and upgrade :)

Read more…

Das ist traurig: In Kalifornien, Oregons Nachbarstaat, hat der Gouvernator heute seinem Namen wieder alle Ehre gemacht:

Read more…

Da raucht der Kopf: Nach einem zehnwöchigen Term war vor zwei Wochen Dead Week und letzte Woche Finals Week, Abschlussklausuren. Und, obwohl man eigentlich während dieser zwei Wochen keine Hausaufgaben mehr haben soll, waren das die anstrengendsten zwei Wochen des ganzen Terms: Mehr Hausaufgaben denn je und nebenbei auf die Klausuren lernen. (Kein Wunder dass man nicht mehr zum Bloggen kommt ;) )

Read more…

Eigentlich mag ich den Spreeblick ja nicht sonderlich. Seit dort die Jamba-Geschichte online war, wanderte er auf vieler Leute RSS-Feed-Liste und Blogroll und alle dachten, hey, das ist die Urform eines deutschen Blogs. Der Betreiber (namens Johnny) fand das toll, machte eine Firma auf und hielt fortan Seminare über das Bloggen im Allgemeinen und im Besonderen. Das selbsternannte Sprachrohr der deutschen Bloggerszene. Schön, wenn man bei den großen Boulevardmagazinen Deutschlands arbeitet und plötzlich die Vielzahl der Blogs im Internet auf ein oder zwei von ihnen trivialisieren kann.

Read more…

LinuxWeekly News (leider: in der ersten Woche Subscriber only, also bisschen Geduld ;) ) schreibt diese Woche über das OpenDocument Format. Dabei handelt es sich um einen neuen Dokumentenstandard für Office-Programme (Texte, Tabellen, Präsentationen), der einen "gemeinsamen Nenner" für verschiedenste Office-Pakete darstellen soll.

Read more…

Oooh, heute ist ja schon erster Advent!

Read more…

Heute ist Thanksgiving, der wohl wichtigste nationale Feiertag in den Vereinigten Staaten.

Read more…