Friday, May 25, 2007

Free MP3s

Having a good solid day of coding to do at work, I plugged in my noise canceling headphones, turned on some tunes, and dug in. I love the groove I get in during times like this. It's really a rush to be so productive and to feel so clever about the amazing code that is just flowing from my brain and through my fingertips into my emacs buffer. Aaaaah.

Amazingly enough, things occasionally do conspire to break my concentration, even in these times of extreme concentration. Usually it's when the compiler takes more than 15 seconds. OK, so maybe I'm not that focused. Yesterday, I started noticing how bored I was of my music at times like these. Fortunately, amidst the difficult logical puzzles I was solving with my fantastic firmware, I was able to solve this problem as well. I remembered The Internet Archive and its astounding collection of live concert recording.

Yes, for bands that allow it, they allow fans to record their concerts with expensive and complex equipment and then upload the recordings here. I'd guess that 90% of the bands they have I haven't heard of, but I did notice Toad the Wet Sprocket and Guster. For their recent concerts you can stream the music right from the Archive.org website. For any concert you can download shorten or flac files of the songs, and many have mp3s you can download too. I enjoyed the two shows I linked to above yesterday. Very cool to hear the banter between songs, and the improvisations and covers that they do (though there were a couple naughty words used that you don't hear from these guys on the radio, I must warn you).

So yeah, just thought I'd share that tip with you. Go listen.

Friday, May 18, 2007

gam_server

I installed digikam on a whim at work (f-spot has been annoying me lately, so I thought I'd check out the kde equivalent), and then noticed that my network usage was up pretty high. I ran top and something called gam_server caught my eye. Since it had server in the name I figured it might be network related. Some quick googling around and I learned that gam_server monitors changes to files on your filesystems. Some people mentioned it causing problems with nfs mounted filesystems, which I definitely have a lot of here at work. Others mentioned it being tied in with KDE at a pretty low level, and one forum post on gam_server even mentioned digikam by name. So, on another whim, I did an aptitude remove digikam. My network activity dropped back to near zero.

And then I figured I better write that tidbit of information down in case it could come in handy later. That's all. Thanks for reading.

Thursday, May 17, 2007

A Chilling Tale of Incompatibility

I just read this scary story written by Jeremy Allison about a poor 11-year old and Windows Vista. Here's the poignant quote from the tale:

Copy and paste were disabled. Think about the fear and paranoia that led to that decision in the product design meeting for the trial version....What this means is that if you use the trial version of Office 2007 for thirty days, all documents you create will be completely unreadable by any other software unless you buy back access to your documents by purchasing the full version of the software. No easy way to get your documents out.

I'm speechless.

Wednesday, May 9, 2007

Gallery 1 on Feisty

Another post in the continuing saga of my upgrade from Edgy to Feisty. Last time, I mentioned that my Gallery was still not working. I get this line in my apache2 error log (/var/log/apache2/error.log):

...gallery/.htaccess: Option Indexes not allowed here

To work around it, I need to go to the automatically generated .htaccess file in my gallery directory and comment out the line:

Options -Indexes +FollowSymLinks

If I re-run the configuration wizard, the line comes back and things top working again. I can't figure out why Options Indexes and FollowSymlinks aren't allowed. It seems they must have been with Edgy, but I can't see what changed when looking at the RCS history of my apache configuration files (yes, I keep any configuration files that I modify under RCS on this machine. I've started using mercurial and/or bazaar for the entire /etc directory on other machines). Is it something different about the newer version of apache? Google isn't helping me hear, and a quick search of the apache docs isn't helping me either. I'm getting too tired at this point. I stayed up too late last night.

Fixed Django Powered Blog

OK, I figured out the problem with my Django powered blog. The new pg_hba.conf file had stricter permissions for local users. I had to change it from "ident sameuser" to "trust" and then my django app could connect to the database. I also had to make sure, after editing it as root, that the pg_hba.conf file was writable by the postgres user. Then I could /etc/init.d/postgresql-8.2 restart successfully, and everything works again. Oh wait, my php photo gallery is still down. Grrr!

Restore PostgreSQL

The magic command to restore my lost database, once I got my dump file out of my backup, was:

sudo su postgres -c 'psql -f /home/bryan/backups/all.dbs.out postgres'

My Django website still doesn't work though. Darn you, Ubuntu! (sorry for the harsh language)

Edgy to Feisty Horror

As mentioned previously, I upgraded my work machine to Feisty Fawn without much trouble, but waited on doing my home machine because I knew it would be a bit trickier. The reason is I run a family website from that machine. It's basically a blog built with Django and it uses a PostgreSQL database backend. It also has a photo gallery with tons of family photos. I would hate to lose either of those.

I had a bunch of free time last night, and I had backed up important stuff to some DVDs recently, so I decided to go for it. I clicked upgrade in the Update Manager and off it went. About then a good friend of mine called. We hadn't talked for a long time, and we had a lot to catch up on. Perfect. I let the install run while we chatted. It was taking a while to progress, but I didn't think too much of it. After we hung up and said goodbye, I started reading a book. It was finally to the configuration and setup part and occasionally asked me some questions. I was enjoying the book, and didn't notice for a while how long this was taking. It was taking a long time. I noticed finally that the time on the computer screen had stuck at 11:58 PM, but it was really about 1 AM. I panicked a bit and looked hard. Something called mdadm was taking forever to do something. I typed top and saw an acroread process hogging all the CPU. "Curse you, Adobe!" I thought to myself. I killed the process and all of a sudden the upgrade started flying. It finished in just a few more minutes. Wow, I wish I had caught that sooner.

Being late and night, and just wanting to get through it, I didn't pay too much attention to what packages it said it was uninstalling because they were obsolete. I already knew it would uninstall mod_python for some strange reason. After the install finished I aptituded that, but my django website still wouldn't run. The database was missing! PostgreSQL had been uninstalled, and my database completely wiped out, as far as I could tell. PHP was also uninstalled. I've upgraded this box from Breezy to Dapper, and from Dapper to Edgy without any problem, I don't know why it decided to nuke those packages, and my data with it this time. That is just so wrong, Ubuntu, and I hope you are reading this!

No big deal though, I figured. This is a home machine, nothing new had been added to the database today and it was automatically dumped to a file by a cron job last night. I'll just import that dump file found here:


$ ll all.dbs.out
-rw-r--r-- 1 bryan bryan          0 2007-05-09 01:14 all.dbs.out

In case you didn't catch that, the "0" right before the "2007-05-09" means the file is empty. Yes, my backup failed, because it happened automatically during the update.

I can't recall too many times in my life when I've felt the blood drain from my face, but this was one of them. Seems like they have all been related to stupid things that computers have tricked me into doing, like just now. I suppose that in the grand scheme of things, that says a lot about how blessed I am. To only have cause for that kind of panic from minor things like lost data is really pretty good. Now, the morning after, I can think of much worse things to have to be afraid of. But I wasn't thinking about the grand scheme of things right at that moment last night.

Actually, I must not have been completely oblivious to said scheme, because I didn't panic for too long. I have a backup on a DVD that isn't too out of date. Maybe the missing blog entries from that could be found in the Google cache or something. A quick search showed that, in fact, they could be found. Thank you, Google. That just rocks.

The website is still currently down. I have the backup DVDs at work, just in case, and I'll retrieve the database dump when I get there, and then re-create any lost blog entries from the Google cache. Hopefully I won't find anything else amiss.

Monday, May 7, 2007

A Better Shell 2

I got the suggestion to try rlwrap as an alternative to emacs in order to get a better shell. I've tried it, and here's my professional review: it rocks. I've showed it to a couple of colleagues and they were dully impressed as well. I think, actually, that I like it better than the emacs shell. It's quick, and it keeps its history separate from your bash history, which is very nice. It also remembers history across sessions, which doesn't happen if I close and re-open the emacs shell.

You can use apt to install rlwrap on Ubuntu Feisty Fawn (universe repo). It's also available with the cygwin setup.exe thinger. I had to compile it for my old redhat 8 box (don't ask), but that was super simple. Overall, a very nice little tool.