I just upgraded my HTPC from some old Ubuntu to Debian Lenny, mostly to get the newest 0.22 version of MythTV. The installation was pretty straightforward except that the channel scanning didn’t work. For this I had to use the scan program to get a channels.conf file to import into MythTV. After that all was fine. Except that I didn’t have any EIT data. And that annoying problem has now been bugging me for over two weeks and hundreds of browsed MythTV forum pages and HOWTOs. Until I today found a solution.
Category Archives: Geek speak
This is one of those errors in Rails that just make you go WTF!? The amount of debug information is minimal, and the row that supposedly is the culprit is syntactically correct. Even Google doesn’t really help. I gather that this error can occur in several different contexts and caused by different things, so I’m not trying to provide an all purpose solution to this. The case I’m going to show you is probably quite rare, but it happened to us at work today. I never figured out exactly why Rails chokes in this situation, but I found a way to reproduce the problem and also a solution. The main characters in this drama are the respond_to and render methods, and the main villain is a mysterious invisible parameter.
I just wrote my first ever AppleScript to solve a problem I’ve had for some time. As I’ve mentioned several times before, I use the MPD music player on my HTPC to play music through my amplifier while controlling playback using my laptop or mobile phone. This works like a charm and I’ve been really satisfied with this setup — until I fell in love with iTunes’ Genius function.
I use iTunes on my MacBook and mainly at work, either listening through my headphones or streaming music to the office speakers using our AirPort Extreme. As my library is rather diverse, I like to use Genius to get an ad hoc playlist of similar songs to avoid the “shuffle all, press next until a good song comes along” selection method. Needless to say, Genius has worked fabulously. However, when I come home and start playing music through MPD, I’m back to the shuffle all hell since I can’t be bothered creating playlists manually.
So this got me thinking: Is there any way I can use iTunes Genius together with MPD? The answer is yes, and the tool I used is AppleScript.
I’ve already gone on about how fantastic MPD (Music Player Daemon) is. The server-client music player has totally changed the way I listen to music at home. By having the MPD server (that actually does the playing) constantly running on my HTPC connected to my amp and speakers, I can control the music playback from any device that has an MPD client written for it. Since the server doesn’t stop playing if a client quits, I can start playback using one client and stop it using another.
Until today, I had a couple of text-based clients on the HTPC itself (for controlling playback over SSH ;), two-three clients on my laptop, one on my girlfriends laptop and one on her iTouch. Chances are quite high that at least one of these are switched on and within reach at any given time. However, there are times when both laptops are shut down, the iTouch has run out of batteries, I’m late for work and MPD is happily playing since I forgot to stop it before I put my Macbook to sleep. This morning was such a time.
When I was new to MPD and wanted to install clients on everything including the toaster and microwave oven, I tried out a client for S60 mobile phones. As far as I remember, something didn’t work and I probably lost interest and thought that my gazillion clients already installed would suffice. Well, today I started looking into it again, the JavaME client for MPD, Remuco.
Every once in a while I need to set up a temporary SSH tunnel from one computer to another, possibly via a third one, and can’t be bothered with configuring any of my otherwise frequently used GUI tools ‘SSH Tunnel Manager’ for OS X or ‘SSH Tunnel’ on Win XP. Each time, however, I end up reading the man page for the ssh command or googling for ‘ssh tunnel linux’ or something similar, since I never seem to remember how to set up a simple SSH tunnel on the command line. The ssh man page is especially unhelpful:
What? Which port goes where? And what’s the bind_address and hostport? If you read the explanation of the switch you’ll probably just become even more confused. After a few trials and errors I usually get my SSH tunnel up and running, but most of the time I’m not quite sure what I’ve really done.
So here’s a note to self on how to do this once and for all.
There are a lot of these out there on the Interwebs, but this is one of the few I’ve run into (since I don’t normally use Windows) and the only one I’ve captured.
There are two serious wtfs here.
- The application wasn’t Internet Explorer, although it says so in the dialog title. It was Windows’ (supposedly built-in) zip application. The scenario: I opened up a zip file and dragged one of the compressed files to the desktop.
- The question. Move or copy…? Ok, I want to copy, since I want the file to remain in the zip file. So then I’ll answer… Yes..? No?
Of course, this is a matter of interpretation, but still. Dialogs mustn’t be ambiguous like this.