2012 in review: the year ends, the world doesn’t

Rugby League
Rugby League

At the start of this year, as always, I set myself a set of goals, some of them in review:

  • Learn German
    • This went really well until about March and then I got busy.
  • Summit Mt Kosciusko
    • This was all but forgot about, so will be a goal for 2013
  • Spend more time on non-computer aided activities
Easter Show
Easter Show
  • Achieved!
  • I have spent more time in the evenings reading real books, and going out with mates on the weekends.

During the past year I haven’t done any hiking, and there have been fewer adventures. Having said that I have still done a fair amount of fun things around Sydney during the year:

Read more

Photos: Warragamba Dam Wall Walk

For the first time since 1998 the Dam Wall on Warragamba Dam has been opened to the public.

I went up today with a few friends from uni to check it out. The dam itself is impressive in it’s height, the water is over 100m deep on the storage side of the wall.

After grabbing lunch we headed down to the Nattai lookout to check out the views of Lake Burragorang. A set of photos of the day are below.

Read more

Photos: Sydney to Hobart Start from South Head

This afternoon I went out to watch the start of the Sydney to Hobart yacht race from South Head.

After almost missing the start of the race due to the bus getting caught in traffic I arrived with 3 minutes to spare.

Below are a selection of shots of the boats as they went through the heads, I was mostly just pointing and shooting as the shear number of people didn’t give much of an opportunity to line up perfect shots.

Read more

Replacing titles with captions in WordPress gallery image links

Recently I have installed a colorbox plugin onto this blog for image galleries.

This plugin overrides the default behaviour of an image gallery and replaces individual image pages with a simple in-page pop up of the image. It works quite nicely, however, one problem I have had is that it extracts the title attribute from the former page links rather than the caption of the image that it is displaying.

I have spent the last few days trying to figure out a way to get the behaviour I want out of the plugin. However, this has been much more difficult that expected, the code that generates the galleries in WordPress is buried deep in the code and isn’t as straight-forward as replacing title=getTitle with title=getCaption. Trying to edit the behaviour of the jquery on the colorbox plugin isn’t an option either as it is heavily optimised. And updating every database row to replace the title with the caption also isn’t very practical.

Instead the simple hack below will achieve what I want. It isn’t pretty and I am still looking for a better solution, but in the meantime after the page has been rendered the jquery quickly looks for galleries and replaces the titles in any links with the alt text from the image. This means that when an image loads in the colorbox it displays with a caption.

<script type="text/javascript">
jQuery(document).ready(function($) {
 $('.gallery img').each(function() { 
  $(this).parent().attr('title',$(this).attr('alt')); 
 });
});
</script>

Photos: Sculpture by the Sea 2012

This morning I went down to Bondi Beach to check out Sculpture by the Sea.

I did a pretty good job of getting in before all the crowds, although, there was still many people along the coastal walk.

The photos below are just a mere sample of the many sculptures along the walk between Bondi and Tamarama and it is well worth checking out in person over the next three weeks.

Read more

Bumblebee, Optimus, Hybrid Graphics, and Ubuntu

For the last year or so I have been struggling with my laptop overheating under Ubuntu. Upon upgrading to the latest beta of Ubuntu 12.10 I have managed to completely solve the heating problem and as a result increased my battery life by more than an hour.

Two different problems have caused the heating problem. The first, a power-regression bug on i7 processors was resolved in Ubuntu 12.04 with an updated kernel.

The second is caused by the Nvidia Optimus Hybrid Graphics card in my laptop not being properly controlled by Ubuntu. Problems with Hybrid Graphics under linux are well documented and there are quite a few different “solutions” available, however, I have been unable to get any to work until now.

A few months back I installed the Bumblebee project, and despite the packages successfully installing, the hybrid graphics card never worked and battery life remained terrible.

Upon upgrading to the latest Ubuntu beta I noticed a problem in the logs during the install of one of the bumblebee packages: bbswitch-dkms

The package would “successfully” install, however, the terminal output would show that the kernel module was never built.

The problem lies in missing kernel header packages. While the Ubuntu Wiki pages do not detail any requirement for the installation of kernel headers other sites do, however, these other sites only focus on the kernel headers for the currently installed kernel. And, if you update the kernel without new headers, it is possible that the kernel module will no longer work and the overheating problem will return.

This is how I setup my system so that I would always have the latest official Ubuntu kernel and headers with bumblebee working:

1. Install the linux-headers-generic package:
sudo apt-get install linux-headers-generic

2. Setup the Bumblebee PPA:
sudo add-apt-repository ppa:bumblebee/stable

3. Update the package information:
sudo apt-get update

4. Install the bbswitch-dkms package:
sudo apt-get install bbswitch-dkms

Before moving on make sure that the output from the above command shows that the module was successfully installed.

5. Install the rest of Bumblebee:
sudo apt-get install bumblebee bumblebee-nvidia

6. Restart and then test if Bumblebee is working:
a) glxgears
b) optirun glxgears

The second command runs the opengl test using the Optimus graphics card and the output in terminal of the FPS should be much greater than the previous command. Bumblebee should now be successfully installed and you should notice a large decrease in CPU heat and an increase in battery life.

In my opinion during the install of the bbswitch-dkms package a check should be made for the required kernel headers to build the kernel module, if the packages aren’t found a proper error and suggested solution, such as the installation of the headers package should be suggested. A silent fail that keeps the rest of the installation running only provides the end user that false hope that things are working fine.

North American Adventure: Part Four – Baltimore and Washington D.C.

Baltimore Inner Harbour

After spending three days in New York with two other colleagues we parted ways and I caught the Amtrak from Penn Station to Baltimore. The train ride down was a highlight of the trip. On the three hour journey we passed through five states: New York, New Jersey, Pennsylvania, Delaware, and Maryland. I was a little disappointed to not get off the train in Philadelphia as in early planning for the trip I was going to spend a few days there but as it turned out I saw more than enough other places in my adventures.

Read more

North America Adventure: Part Three – New York City

Times Square

After AAAI finished two friends and I travelled from Toronto for a few days visiting New York City.

We flew into La Guardia at midday on Saturday and caught the bus from the airport to Manhattan. Our first bit of fun came when, in a little bit of traveller confusion, we failed to get off the bus at the right spot to change to the subway. So before we know it we are a little bit lost in the middle of Harlem.

Read more