When we told people about our forthcoming trip to Chile, there was a noticeable lack of enthusiasm for Santiago as a destination but considerably more for the nearby coastal town of Valparaíso with its UNESCO world heritage port area. We arrived in violent rain, which confirmed our decision to pick a hotel that would be easy to find by virtue of being both on the sea front and main road, as a good one. Hungry after our drive we set off up one of Valparaíso’s many hills in search of lunch and immediately noticed the colourful murals that gave a bohemian vibe quite different to the shiny glass towers and manicured parks of the Providencia neighbourhood in which we stayed in Santiago. Having seen practically no other tourists in Santiago, we immediately spotted quite a few on the streets and heard almost as many British voices as Spanish which was quite a turnaround. There seemed to be a large number of funky cafés here too—Valparaíso is clearly a way point on the international backpacker circuit. 

After a restorative Italian-style pizza lunch we headed on up the hill to La Sebastiana, former home of Nobel prize winning Chilean poet Pablo Neruda. Perched high on the hill, the rooms provide a spectacular view of the entire of the city spreading out towards the sea below, and Neruda was also an avid collector of unusual, interesting and beautiful objects which were artfully arranged throughout the house. The house was lovely, but it also felt like an oasis of calm and niceness after the walk through dirty and smelly streets covered in dog mess and grafitti. 

The next morning we explored the old port area which is the reason for the World Heritage listing.  The area definitely has character with its brightly coloured Victorian buildings but the majority were too shabby and run down to be called picturesque and without a guide to bring the place to life we sadly failed to find anything interesting on our own.  It was not all bad though as every meal we had in Valparaíso was excellent. Café Vinilo served us a delicious dinner of ceviche and a traditional ham dish followed by home-made palm oil ice cream (which tasted a bit like maple syrup mixed the caramel) washed down with an excellent Carménère. At breakfast the rumour of soya milk caused Rosie to lead us on a pre-breakfast adventure to the Melbourne Café which did a fairly Chilean ham and cheese croissant but also a proper flat white. So we left Valparaíso with mixed feelings, great moments but perhaps not a place to linger. 

Following in Darwin’s Chilean Footsteps

Today we were hiking in Chile’s Parque Nacional La Campana. Charles Darwin hiked up the Cerro La Campana mountain in 1834, and from the top you can see the Andes on one side and the Pacific Ocean on the other. While we followed in Darwin’s footsteps up the mountain, it was sadly an overcast day and views were limited. 

The Sendero El Andinista trail we took was well marked but it was a steep climb from car park at 400m to the peak at 1920m and the footing quite rough at times. With the cloud closing in and the peak hidden behind a cloud we decided to not exhaust ourselves and turned back after a tasty picnic lunch at 1270m—the last 650m of elevation was to be covered in just 2km of trail and the guide book had warned us this part was particularly difficult. While it was sad not to be able to see the full extent of the views, being overcast did keep the temperature pleasant and it was a pretty walk. As an added bonus we also had the trail to ourselves, seeing just one other group who appeared from nowhere at lunch and headed past us for the summit. 


OS X and IMAP Accounts

On a fresh install of OS X Yosemite, the was unable to see the notes stored on my IMAP server. The account was working properly in Mail, and worked fine with other accounts.

I recall having this same problem with a previous version of OS X, and that it was related to the “IMAP Path Prefix” advanced setting within the Internet Accounts system preference panel. The prefix is set correctly so I was about to give up on this as being an annoying–but–ignorable bug when the very last post in this forum discussion indicated that a cargo-cultish approach of changing the prefix, opening and closing notes, then reverting the setting had fixed it. I can confirm that this solution also worked for me. I kept closed for the duration to prevent it being confused, and observed that simply unsetting the value is insufficient, it must temporarily be set to another value, such as “none”, to work.

Which email addresses receive spam?

One of the advantages of owning a domain name is the ability to create a limitless number of email aliases. I use this to allocate each company that requests an email address a unique one, which makes it a lot easier to spot phishing emails, and track whether a company has used it according to my expectations. A recent browse through my spam email folder showed some egregiously bad spam (obvious frauds, scams, etc) being sent to aliases assigned to companies.

  • Vision Express
  • Tumblr (the micro-blogging platform)
  • JET Photographic, Cambridge
  • Adobe — suffered a well publicised data theft
  • LinkedIn — likely someone with whom I am connected since they would then see this email and could import it into their personal address book
  • Dropbox — dropbox includes this email address when I share files and links with others via its service so again the leakage is probably from a third party

Another surprising result of my browse is that the email address I publish on this website does not get very much automated spam, although it does get the occasional offer of “sponsored posts”.

Resolving mixed content errors with WordPress

This blog has in theory been available via a secure (“https“) connection for about 2 years. I say “in theory” because some of the images were being loaded from insecure connections which meant there still ways to easily circumvent that security. After some digging it seems this is a long-standing known problem with the WordPress software that runs this blog, and despite some recent activity, still not fixed in last week’s 4.0 release.

Fortunately the discussion in the bug report does provide a one-line workaround. There was no advice on where to put that one liner, so I decided to write a plugin as it would then be easy to toggle on and off if required.

 * @package fix_ssl_attachment_url
 * @version 1.0
Plugin Name: Fix SSL Attachment URL
Plugin URI:
Description: Hacky fix for wp_get_attachment_url function not checking for https. 
Taken from the bug report referenced above.
Version: 1.0
Author URI:

add_filter( 'wp_get_attachment_url', 'set_url_scheme' );

The next challenge was that the instapress plugin I had been using to display my Instagram photographs in the side bar was also using insecure content. It seems that instapress is no longer supported, and although worked for me, might not continue to work for much longer so I upgraded to Simple Instagram. This was a straightforward drop-in replacement (once I had successfully made an Instagram developer account) but displayed three Instagrams per row which I found a bit small. The author appears to be very active and helpful on the forums, providing these hints on how to customise it, but initially I could not get this to work for me when I put the settings in my custom theme’s style.css. The problem is that the first CSS class is now .si_feed_list and I found I needed to mark the customisation as !important in order to override the default.

/* For use with the Simple Instagram plugin */
.si_feed_list .si_item {
  width: 50% !important;

Finally I had to disable the Simple Facebook Connect plugin. Like instapress, this was reported as being broken and discontinued by the author.

Photographs from Kuala Lumpur and Langkawi

Photographs from our short trip to Malaysia last year. Kuala Lumpur was busy and fun but also had a lovely lake garden and excellent Islamic Art Centre. Langkawi was very beautiful with lots of nature to relax and enjoy.

You can also view this gallery on flickr.

Managing cron.d with chef

I have recently been playing with the chef configuration management system. I was looking for a way to manage files in a directory such that any that were created by chef would be cleaned up again when they were no longer needed. A classic use case is the /etc/cron.d directory which may be populated by files from multiple sources. There appeared to be no established pattern for this but since chef allows the use of ruby in its recipes, I was able to construct the following. It assumes the use of the cron cookbook.

cron_d 'usercron.chef' do
  minute 0
  hour 23
  command '/bin/true'
  user 'myuser'

Dir.glob("/etc/cron.d/*.chef") do |f|
  name = f.split('/')[-1]
    t = resources("cron_d[#{name}]")
  rescue Chef::Exceptions::ResourceNotFound
    cron_d name do
      action :delete

OS X, bash and UK Keyboards

On an Apple UK keyboard, the # symbol is accessed by pressing ⌥-3 (pronounced option 3). Unfortunately the terminal application is only useable when option has been mapped to the UNIX meta-key, which takes precedence over “special” characters such as #. Thanks to this tumblr post, it is possible to work around this problem:

$ cat .inputrc
"\e3": "#"

Unfortunately .inputrc is a bash-specific configuration file and this does not solve the problem for terminal-based applications.

Google Maps and iOS Background App Refresh

I am posting this to the web in case it helps anyone else trying to troubleshoot a similar problem.

Recently I noticed my iPhone’s battery was ending each day significantly lower than usual, causing me to have to charge it every night instead of every couple of days. At first I suspected the extra consumption was caused by communicating to my Pebble smart watch but quickly eliminated that possibility when turning the Pebble off for a day had no effect.

After some experimentation, the change that restored my battery usage to its previous norm was disabling background apps refresh for Google Maps. This was an application I had recently installed because it works very, very, nicely with the Pebble, sending turn-by-turn navigation directions to your wrist as you walk. This completely removes the need to take the phone out of its pocket every few minutes to double check that the road you just passed was not the one you were supposed to turn down! However I do not use it frequently enough to justify doubling my daily power consumption…