Archive for February, 2008

Starting a tftp server in OS X Leopard

Monday, February 25th, 2008

Copy the file you wish to serve to:

/private/tftpboot

Then:

sudo launchctl

From the launchd% prompt run:


load -F /System/Library/LaunchDaemons/tftp.plist
start com.apple.tftpd

And when you’re done using the server just:


stop com.apple.tftpd
unload load -F /System/Library/LaunchDaemons/tftp.plist

Google Charts and Ruby

Tuesday, February 5th, 2008

I’ve started playing about with adding some Google Charts to SmarterFitter. Google Charts is a neat API for having Google draw you a pretty picture of your data.

Right now I’ve settled on this gem: http://gchartrb.rubyforge.org/ but that was simply the best of a fairly immature bunch.

Once gotcha when using Rails 1.2.6 and image_tag is that image_tag will attempt to append a ‘.png’ extension on to the end of the URL that the gem has created for you and that will really mess with your charts.

SmarterFitter Food Database-1.jpg

Scrabble

Tuesday, February 5th, 2008

I’ve never really been one to play crosswords or enjoy Scrabble but over the past couple of months I’ve come to really enjoy Scrabble.

Flickr_ Search.jpg

Perhaps I just really like it because the pieces reminds me of my Apple keyboard.

Apple Aluminum Keyboard on Flickr - Photo Sharing!.jpg

Mac Port tip for deailing with ports with failing checksums

Tuesday, February 5th, 2008

While trying to install rmagick I ran into a faulty mirror or something and the libxml2 distribution file wasn’t verifying.

I’d tried to clean the port and reinstall but that failed.

Here’s the magic:

sudo port clean --work --dist <port_name>

Until I did that it told me again and again it was fetching the port but it was actually just pulling a cached version.

E.g.,

tim@manhattan:~$ sudo port install rb-rmagick
--->  Fetching libxml2
--->  Verifying checksum(s) for libxml2
Error: Checksum (md5) mismatch for libxml2-2.6.30.tar.gz
Error: Checksum (sha1) mismatch for libxml2-2.6.30.tar.gz
Error: Checksum (rmd160) mismatch for libxml2-2.6.30.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: The following dependencies failed to build: ImageMagick libxml2 pkgconfig tiff ruby readline
Error: Status 1 encountered during processing.
tim@manhattan:~$ sudo port clean --work --dist libxml2
--->  Cleaning libxml2