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.

<?php
/**
 * @package fix_ssl_attachment_url
 * @version 1.0
 */
/*
Plugin Name: Fix SSL Attachment URL
Plugin URI: https://core.trac.wordpress.org/ticket/15928
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: http://www.toobusyto.org.uk
*/

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'
end

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

OS X Terminal.app, 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…

Final photographs from Japan

A final collection of photographs from our trip to Japan. We are positioned ourselves on the right side of the train to see Mount Fuji for our trip from Osaka to Tokyo but sadly it was too cloudy. I have included some photographs of the view from the train window because I think it gives a nice impression of what you see when travelling on the Shinkansen. I also managed to get one photo of Mount Fuji from the plane window as we took off for London. Would love to go back one day.

Retrospective of our day in Tomonoura

During our trip to Japan in 2012, we took a day trip to the historic port town of Tomonoura in the Hiroshima Prefecture. I do not remember why I did not blog about it at the time but it proved quite photogenic so I thought I should write something to provide context for the photographs.

The town is on the side of a hill, the upper part provides some lovely sea vistas, and we enjoyed the bonus of some beautiful sea eagles soaring on the warm thermals. At sea level the town has picturesque traditional wooden buildings and quaint narrow streets. Lunch was in a friendly water-side café that served up large portions of satisfying seafood pasta and in the afternoon we took the five minute ferry ride to the island of Sensui Jima. This is undeveloped (except for two hotels) and offered more superlative sea views in return for some light hiking.

Reaching Tomonoura was probably our biggest adventure on Japanese public transport since it required taking a local bus from Fukuyama station. Tomonoura is mentioned in the guide books but it is certainly not on the “standard” tour for Westerners and that made it all the more pleasurable a day. Yet again the people were incredibly friendly, from the bus driver who talked to us about scotch and the Olympics, to the café waiter who translated the Japanese language-only menu and made sure Rosie’s pasta was dairy free.

Wearable Tech: Pebble

I have a new gadget, a pebble smartwatch. The “smart” moniker seems appropriate because it does something in addition to its primary function (telling the time), and as a platform it has a lot of potential, but like the first few generations of smartphones were merely OK phones, this is only a good digital watch rather than a great one.

Why would I want a mini-computer on my wrist when I already have one in my pocket/bag?

It seems to me that large screen phones are popular for a reason: they make better computers. Conversely as the screen size increases they lose all the properties that made smartphones attractive in the first place—easily carried always with-you devices. All the major mobile phone makers have launched voice-based interfaces but not only are they slow and error prone, in many cases the desired responses are fundamentally visual. Hence, the idea is a second screen for the phone that can then safely remain zipped away in a secure location.

What is it for?

For the moment, notifications. There is some rudimentary fitness tracking if you are into that sort of thing, but even being able to read notifications without getting my phone out of my pocket has turned out to be quite useful. For a start, I often fail to notice calls and texts when walking but the pebble makes them much more prominent. I can also see, with one glance and without taking off a glove, whether it is something urgent, or whether it can be dealt with later. People in the habit of leaving their phone in another part of the house will also find it useful since the bluetooth range easily stretches across a couple of floors.

While the pebble can run apps, currently these are mostly of novelty value rather than actually useful. The forthcoming 2.0 API looks a lot more capable and has proof of concept apps for things like displaying the last train departures from the nearest tube station. Notably the pebble does not have any built in speaker, microphone or camera which places it a long way from the significantly more expensive Galaxy Gear.

How good a watch is it?

Functional. Its e-paper screen means the time is always displayed (if you want it to be) and there is a cool motion sensor activated backlight. I did struggle to find a nice watch face that matched the functionality of my Timex Ironman digital watch, but since many watch faces are open sourced it would have been possible to modify one to my purposes had I not found one. Since the platform is very immature, sifting the good watch faces from the gimmicky was also part of the problem: it is currently not possible to search for something as specific as “digital 24 hours with seconds date and day of week”.1 The lack of built-in applications for what I would consider standard watch functionality is probably the biggest weakness right now. For example my Timex digital watch comes with chronograph, countdown timer and multi-timezone functions by default; for the pebble I had to search for an app and then try different ones out until I found one that worked well.

I find many normal watches too bulky for my slim wrists but as you can see from the photo, the pebble fits just about OK—I certainly would not want it any larger. The strap is a standard fitting so can easily be replaced and the battery is claimed to last 5-7 days between charges, which seems accurate based on my usage so far.

Conclusion

The pebble is fun and I already find it a useful addition to my every day life. It is by no means essential—yet, that will require several more iterations of both hardware and software—but the pebble proves the concept has utility in the world outside of Silicon Valley’s reality distortion field.

  1. Currently very few faces display seconds at all, it is not clear whether this is an unfilled gap in the market or because it drains the battery 59 times faster. [back]

Buddy online notification in Messages (OS X Mavericks)

In the days when OS X’s instant messenger program was called iChat, I think it was possible to setup a notification when a particular buddy came online. Mostly not very useful to non-stalker-types, especially as some services logged people in and out fairly continuously, but I would occasionally turn it on when trying to get in touch with an elusive friend or family member in a timezone that offers very little overlap with my own. It appears that is no longer an option in the main interface in Mavericks, but Apple do provide the ability to run an AppleScript whenever an event is triggered.

Continue reading