Jun29
Development
Dan Benjamin did a review of programming fonts and identified Inconsolata as his favourite of the ten he presented. I tried out Inconsolata after this recommendation but have gone back to Consolas. There were a few things that I didn’t like about Inconsolata: It feels a bit round, it has a weird lowercase ‘t’ that ends up looking bold when the other text isn’t, the ‘i’ looks a bit thin and using left curly quotes all the time looks a bit strange. I also thought the tilde wasn’t defined enough, particularly in a prompt. Being freely available and not having to jump through hoops is certainly a plus though.
A few weeks later Dan posted a follow up post about Anonymous Pro. I personally can’t see what the attraction to that one is. The larger type looks with a mix of upper and lowercase letter appears like two different fonts and ends up looking a total mess to me.
Around the same time as Dan’s second post news broke that Snow Leopard will ship with a new monospaced font called Menlo that will replace the use of Monaco as the default font in applications like Terminal and Xcode. Menlo is derived from DejaVu Sans Mono which is in turn derived from Bitstream Vera Sans Mono. Jon Shea from ExpanDrive posted a comparison of Menlo to Bitstream Vera Sans Mono that shows the changes that Apple have made. From this comparison they all look quite sensible. The Vera family has been licensed in a FOSS friendly manner and is included as a system font in many Linux distributions. I’ve also tried Vera Mono for programming in the past but again I still like the feel of Consolas more.
Below is a screen shot of each font (except Menlo, which isn’t widely available yet) in TextMate using my preferred theme, Railscasts. Note that my baseline was Consolas 13pt and I adjusted the others to approximately the same size. The code snippet used is the same as Dan used in his Anonymous Pro post.
Read the rest of this entry »
Jun28
Code
A few days ago I decided I wanted a feed of the VirtualBox News page. I mainly wanted this to know when new releases are made. Whilst the application does update itself, sometimes I go a while without firing it up so seeing the release in Fever would be nice.
After some brief Googling I didn’t come across anything that was obviously designed to create feeds from Ruby (outside of Rails). So I opened up the Atom Feed spec and built the feed manually. The end result is a Ruby script and a feed (updated daily) at: http://home.wezm.net/files/virtualbox.atom. Thanks to the brilliant nokogiri this was relatively straightforward.
My script is below: Read the rest of this entry »
May30
Entertainment
For Manda’s birthday this year I gave her tickets to Rafael Bonachela’s 360°, a contemporary dance performance by the Sydney Dance Company. The performance was in the Playhouse at the Arts Centre (Melbourne). Unfortunately it didn’t meet our expectations.
Now let me preface the rest of the post with the following: We’re hardly connoisseurs of the fine arts. Instead we got the bulk of our prior exposure to contemporary dance through channel Ten’s So You Think You Can Dance. I’m sure the purists out there would scoff at that but we wouldn’t have even entertained the idea of seeing 360° were it not for the show.
With that out of the way let me continue by starting at the end. After the performance finished and we’d endured what seemed like several minutes of applause with much bowing and cutting of lights only for them to return again, Manda and I both said nothing to each other about it. We were both feeling underwhelmed and wanted to withhold our comments until out of ear shot of people that might not agree.
The performance seemed to lack any coherent story. The music choices seemed inappropriate to even tell a story and the projected backdrops seemed to have no relationship with what was going on on-stage. I was left feeling that I was not on the right level to understand it and some aspects were “arty” for arts sake. For example the sand covered skull with the sand falling in reverse to slowly reveal the skull.
Ignoring the aspects I didn’t like there was still things that I did like. The skill of the dancers was most impressive. The use of light and mirrors was creative and clever. So overall the experience was a disappointment. I’m hoping that we will find another contemporary performance to see in the future that will live up to our perhaps uncultured expectations.
May17
Internet, Tips
On a number of sites at work we employ a static file caching extension to do just that: create static files that are served until the cache is invalidated. One of things that will invalidate the cache is deploying a new release of the code. This means that many of the requests after deploying will need to be generated from scratch, often causing the full Rails stack to be started (via Passenger) each time. To get around this I came up with the following to use wget to spider each of the URLs listed in the sitemap.xml. This ensures each of the major pages has been cached so most requests will be cache hits.
wget --quiet http://www.example.com/sitemap.xml --output-document - | egrep -o "http://www\.example\.com[^<]+" | wget --spider -i - --wait 1
That should all be executed on one line. There’s a one second wait in there to spread out the requests a bit but you can remove it if you like.
May15
Mac OS X, Programming, Tips
I’m not much of a user of TextMate project files, generally preferring to just mate . in a directory. This works great until the directory or one under it contains large, irrelevant files like log files or database dumps. Its at this point you start encounter massive slow downs in the otherwise very useful ‘Find in Project…’ function. The slow downs turn into crashes if the files are big enough as this results in TextMate atttempting to grab vast amounts of memory. Eventually the OS tells it to, “bugger off, 1Gb is all I can give you”, or something along those lines.
A common solution, particularly when working on Rails projects is to create a shell alias that just invokes mate with the directories of interest. This works ok but given I’m working on a mix of project types (Pylons, Rails, Radiant) I wanted a solution that did the reverse: Choose everything except what I want to exclude. Informed by an answer to a question on Stack Overflow I came up with this:
As the comments in the script note I have this in a file called ‘ate’ in ~/Local/bin, which is in my PATH. I can now happily go to any directory, type ate and have it ignore that list of directories.
Apr23
Software
↓ Jump to solution
Today I was pointed towards a video on the Today Tonight website (an Australian current affairs TV show) and told to save a copy. Our client had gained approval to use the video on their site and needed a copy for that purpose. It was a flash video and whilst I’ve never saved one before I knew there were various tools out there to do it.
My first attempt was a couple of different Firefox Add-ons. None of the three I tried would tackle this video, they save the empty player and a few ads but that was all. After some Googling I jumped on a Windows virtual machine and tried out Orbit Downloader. Its use was a little convoluted but it did indeed seem to identify the RTMP stream and attempt to download it. Unfortunately I think the host was blocking it and it just sat in a loop successfully connecting, then retrying.
Next up I found FLV Recorder it wasn’t immediately obvious how to get it up and running but after following one of the many guides on the site I discovered that I had to tell it what network interface to listen to. I assume that it eavesdrops on the interface to detect and record the video stream, which is pretty cool.
After the interface was selected I was on my way. I clicked the record button, loaded the webpage and started the video playing. FLV Recorder detected the video and started capturing it. As it is capturing the network traffic it’s necessary to let the video play all the way through in the browser. A few minutes later and I had my video. I was able to play it back in the built-in FLV player before uploading it to YouTube.
During my attempts I was able to determine that video itself was in Flash video format (FLV) being transferred using RTMP, which according to Wikipedia is, “a proprietary protocol developed by Adobe Systems for streaming audio, video and data over the Internet, between a Flash player and a server”. It seems that the Flash player itself implements RTMP, which I think is why the Firefox Add-on’s weren’t able to see the network activity.
Capturing an RTMP Video Stream with FLV Recorder
If anyone else is in the same position as me I highly suggest you check out FLV Recorder. These are the steps I followed to save my video:
- Set the network interface in the FLV Recorder options to the one that you use to connect to the Internet (This is a once off setting).
- Click the record button in FLV Recorder (bottom left).
- Browse to the page that has the video on it in your web browser.
- Start the video playing that you want to record. FLV Recorder should start recording.
- Let the video play all the way through and you’re done!
Apr05
Miscellaneous
I was sorting through some old postcards that I bought during the trip around Australia my family did in 1992. Amongst them was this particular one. Now that I’m not twelve and obsessed by tractors and earth moving equipment it seemed quite bizarre. The caption on the back reads:
A view of a Karri tree being lifted prior to loading on to a truck at Pemberton Western Australia
Pemberton is in the southern part of Western Australia that features the Karri forests. According to Wikipedia Karri trees can grow up to 90m tall, making them amongst the tallest trees in the world. The photo seems like such a strange image to put on a post card. Can you imagine writing home to family telling them about the beautiful Karri forests on a card that depicts them being destroyed?
Mar30
Mac
Git comes with bash completion support which comes in handy for completing branch names and things like that. To get this support when installing git via Mac Ports you must add the bash_completion variant. You’ll also want to install the bash_completion port. After that you need to add the following to your ~/.bashrc file:
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
For reference I have the folloowing Git related config in my .bashrc:
Mar30
Mac
Today I followed my own directions on installing Consolas on my Mac Pro. The original directions were put together when installing it on my Mac Book. The downloaded disk image had a different volume name, as did the meta package. So the the command I used to launch the font installer was:
open "/Volumes/Open XML File Format Converter for Mac 1.0/Open XML File Format Converter for Mac 1.0.mpkg/Contents/Packages/OpenXML_all_fonts.pkg"
After the installer ran I went about making it the default font in Terminal. After doing so and setting it the same as it was on my Mac Book (13pt, antialiasing on) it looked terrible on the Mac Pro. Compare the two images below. I was after the latter.

After a little bit of confusion I decided to check the font smoothing style in the Appearance preference pane (in System Preferences). Turns out it was set to Automatic (best for main display) on the Mac Pro and Medium (best for Flat Panel) on the Mac Book. Changing to Medium and relaunching Terminal had it looking identical on both machines.
Mar13
Uncategorized
If you’re a Melbourne Linux user interested in getting started with VirtualBox it might be worth checking out the next Melbourne Linux Users Group meeting. They’re holding a workshop on installing a guest with seamless mouse and keyboard integration. I assume the integration part means they will cover installing the VirtualBox additions on the guest. See the MLUG website for all the details.