I found this to be quite amusing:
Got Ruby on Rails and Tracks working
It took a while to get it working, but I finally managed to install Ruby on Rails and then Tracks, a RoR web application for GtD on my PowerBook.
Some hints for getting it working on Tiger:
- I used a MySQL 4.1 installer from here – my version is
mysql Ver 14.7 Distrib 4.1.10, for apple-darwin8.2.0 (powerpc)
- I used the Ruby on Rails for Tiger installer at this page. I also needed to follow the instructions at the bottom of the page to install the “mysql” gem, which is not part of the aforementioned RoR installer. Specifically, I did:
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Note that if you don’t supply
--with-mysql-dir
, the install of the mysql gem is likely to fail withERROR: While executing gem … (RuntimeError) ERROR: Failed to build gem native extension
. That’s what happened to me at least on Mac OS X Tiger. Interestingly, I was able to install the mysql gem without that option on a FreeBSD server – I don’t know why. - I used ruby-1.8.2 (comes with Tiger), rails-0.13.1, redcloth-3.0.3, and mysql-2.6. Use the
gem list
command to see what you have andsudo gem update
to update. - I used Tracks 1.03, which I got from here. I unzipped the file in $HOME/Sites
- I followed the Tracks install instructions in
doc/README_FOR_APP
for copying theconfig/{database,settings}.yml.tmpl
files toconfig/{database,settings}.yml
, creating a “tracks” database in mysql and populating it with data using the sql scripts in thedb
directory. - I fired up the WEBrick server by running this from the “tracks” root directory:
ruby script/server --environment=production
- Then I went to http://0.0.0.0:3000/signup and created my account and now tracks is available at http://0.0.0.0:3000/ — this is with WEBrick — I haven’t attempted to mess with Apache and FastCGI yet. I’ll save that for another day.
A Cappella concert
Wow, the Treo camera sucks. 🙂
Went to see Nina‘s a cappella group, The Special Guests tonight. Interestingly, the guy sitting in front of me was renowned Stanford computer scientist, Donald Knuth. My favorite song: “Africa” by Toto.
Accessing Windows (SMB), WebDAV, and NFS file shares with Mac OS X
Easy as cake. In the Finder, just select Go | Connect to Server and enter a URL with one of the following protocols prepended:
smb:// | for Windows (SMB) |
http:// | for WebDAV |
nfs:// | for NFS |
An interesting article on scaling Ruby on Rails
Actually it’s not even Rails-specific. Mostly it makes the point that a programming environment that improves programmer efficiency is more cost-effective than a programming environment that improves execution efficiency.
Renaming digital photos with their date and timestamp
If you own a digital camera, you’re probably generating lots of photos and videos with uninformative filenames like “IMG\_0002.JPG
” and “MVI\_0003.AVI
“. It’s not easy to view these files chronologically, especially if you mix photos and videos or files from different cameras.
If you’re on Windows, a freeware program called Stamp extracts the date/time each photo was originally shot from camera-generated metadata (e.g.: EXIF), then adds a timestamp to the beginning of each filename. After running Stamp, you can sort your photos and videos by filename to view them in true chronological order – even if they come from different cameras. E.g.:
IMG_0002.JPG --> 2003-12-25 @09-01-24 IMG_0002.JPG IMG_0004.JPG --> 2003-12-25 @10-23-48 IMG_0004.JPG MVI_0001.AVI --> 2003-12-25 @08-58-17 MVI_0001.AVI MVI_0003.AVI --> 2003-12-25 @09-06-35 MVI_0003.AVI
If you don’t use Windows or if you prefer a simple utility with a command-line interface, take a look at the open-source program jhead.