Blog, by category: hardware
from the desk of travis johnson.
TiVo Router Project (from 2009/03/01)
My girlfriend's TiVo only has an ethernet port. Well, technically, it only has a USB port. We went looking for a TiVo compatible Wifi adapter but were less than successful. We did manage to find a USB-ethernet converter at Fry's Electronics, though. But this means it requires a machine there to bridge from Wireless to the wired port, which is a bit of a hassle on her Windows Vista laptop(though, honestly, what isn't a pain in Vista? </soapbox>).
Rummaging through my bone pile, I came across an older Thinkpad that I'd bought on Craigslist a couple of years ago. It would have been a great deal at 20 Thinkpad with no screen, no CD drive, and no battery…. but it turns out that this makes it pretty much perfect for a project like this(the other alternative was a robot controller… but I haven't managed to find time to learn how to write USB stepper motor controllers yet). I yanked the hard drive and put it in another machine(with a CD drive) and installed Debian's NetInst image for a trim Debian install, then polished it up with the wireless-tools, ndiswrapper, and the drivers for an old LinkSys Wireless-B USB adapter I had back in highschool and rescued on a recent trip home.
The next technical challenge was getting it onto the Wireless here at the University of Washington. Turns out that this is pretty easy too: They had the foresight to allow a long-term association with a device's MAC address via a web form. So, 15 minutes later I had the laptop on the wireless.
Next, since it's functioning as a router, it needs a DHCP server to provide the TiVo with an IP address, and a IP tables MASQUERADE rule to allow traffic back and forth. The DHCP server is easy enough, just an “apt-get install dhcp3-server” and minor config file authoring for that final touch. I also used OpenDNS to set up the DNS routing so that I didn't have to worry about forwarding DNS requests around.
All pretty slick. Now I just need to go over and try to find out if UW Wifi near the TiVo is strong enough.
Fame and FORTRAN (from 2008/11/08)
I must be getting more popular on some search engines somewhere. I just got six random comment-spam messages. Awesome. I guess that's why the more important bloggers have come to rely on Bayesian filters and soforth for taming the wild flow of spam. Hopefully that trend doesn't continue.
Also, it seems as though I am now learning FORTRAN. I'm sortof starting working with Eric Shea-Brown on some Neuroscience research, working with HPC on NSF's Teragrid. It's pretty exciting stuff, and I'm really excited about getting moving on it. Anyways, back to FORTRANizing, I suppose.
Happy Birthday to Me, Pt. 2 (from 2008/10/28)
As always, a picture's worth a thousand words:
id=“attachment_81” align=“alignnone” width=“275” caption=“Sweet!”<img class=“size-medium wp-image-81” title=“Updated MacBook Pro” src=“http:www.traviscj.comblogwp-contentuploads200810picture-2-275x300.png” alt=“Sweet!” width=“275” height=“300” >/caption
A few more exotic uses for older hardware (from 2008/10/22)
There are tons of posts on the internet about what to do with older computers. In general, they say some of the same things: Linux/Firewall, Media Server, and 'BitTorrent Box’. (Incidentally, the lattermost somewhat confuses me. I guess people want to download files on a separate machine in case it has viruses or whatever… but if you're using bit torrent so much that it's worth having a separate box for, you're probably still gonna be upset if a virus takes it out. Or you could just use antivirus or an alternative OS. But I digress.) Anyways, for the uses I'll outline here I'm going to assume that you (at least roughly) fit into the prototype of 'I have a pretty decent computer sitting around that never really gets used.’ In my case, I tend to upgrade and want to keep the old one around because it's still a pretty decent computer, but want to use the newer one for bigger and better things. Like reading xkcd and refreshing google news over and over again. Heh.
One thing you might want to look into is SAGE. It's a fascinating compilation of software in the spirit of MapleMathematicaMATLAB/Magma, but with a Python twist and a snazzy cross platform web interface. There is definitely a time for using as many of the fastest computers you can… but honestly in most computational mathematics stuff, you're going to get 1000-1000000 speedups by using the correct algorithms, and maybe a 2x speedup by using a faster computer. So use a good algorithm on your older computer, and implement RSA. Or experiment with 4th order accurate Runge Kutta. Or whatever. Plus it's a totally good excuse to play with Cython, which I've been wanting to do for about six months now. Anyways, it's a handy play to keep all your Project Euler solutions.
Another idea is backups. While most people say something to the effect of 'run samba or DAV’, I'm gonna step it up a notch and say, 'Use git or rsnapshot’ The version control system Git is Linus Torvald's latest project, meant to replace BitKeeper by being a super-cool distributed way to keep track of your source code. It's got a lot of people talking, and there's a lot of discussion of it's relative merits against Mercurial, bazaar, let alone against more conventional things like the Concurrent Version System and Subversion. While a big part of the draw of distributed VCS's are their non-reliance on a central place to store it all, it's nice to have a copy of it somewhere you can get at it, for the time when you need to pull down a copy of your last draft from a library computer or whatever.
To grab some bonus points here, someone wrote a quick Makefile to take ReStructuredText files to nice-looking HTML, which they added to to their git post-commit scripts to push into their webroot. Cool. Here's their page and how they pulled it off.
Rsnapshot is another really sweet idea. They basically wrote an open-source, fast, easy-to-access Time Machine. At it's core, this project just rsyncs stuff from your home directoryroot filesystemSMB sharewhatever to some backup directory on a regular time interval, giving you some number of dailyhourlyweeklymonthly backups of your files. The key improvement here is that they use symlinks instead of full copies, so you actually only have one copy of each version of the file, which drastically reduces the space requirement while still giving you the ability to go back in time. But because it's just filesystem data and symlinks, it's really easy to get around in it without special software.
Incidently, if you're running a 'server’ for any of this stuff, you might as well deck it out with firewalling, squid caching, and media serving. I usually stick to the basics with firewalls, but you can go about as complicated as you'd like. It's been a while since I've run Jinzora, but it was pretty sweet years ago when it was NetJuke, and since then too–even if they are offering support in a Second Life location. Weird. If you set up squid caching and have a wireless segment, make sure to turn stranger's images upside down. And upon some further research, some people are doing cool stuff with headless Ubuntu BitTorrent boxes.
And now I think it's time for me to go home and see if I can't get one or more of these actually running. Wish me luck!