Unmount USB drives from a script in macOS

I have a number of external drives hanging off my laptop, but sometimes I want to disconnect them. I used to go into Finder and click the eject button but I have five drives now so that’s getting unwieldy.

There are a few different ways of doing this. I wrote a small BASH script based on information here.

I created a shell script on my Desktop, added the following, changing DRIVE to the volume path for each of my external drives:

osascript -e ‘do shell script “diskutil unmountDisk /Volumes/DRIVE”‘

After creating that script I made it executable with chmod +x and as I use iTerm2 as a terminal I associated .sh files with that (Finder, right click on script, Get Info->Open With).
Every time I double click the script a new tab opens in iTerm2 and I see the progress of the unmount commands!

Want 3 months of Backblaze?

Ho Ho Ho! The folks at Backblaze must be feeling the Christmas cheer as they're adding 3 months of Backblaze backup to anyone who signs up within the next 21 days.

I’m a huge fan of Backblaze, having paid for the service since 2013 and had to recently use their backup to restore more than 3GB of photos I took on December 1st and 2nd.

So, if you’re not backing up your data I can recommend Backblaze. Sign up here for a free trial, and if you buy a subscription you’ll get 3 months free, but only if you sign up within the next 21 days. I get 3 months free as well which will make me very happy too. 🙂

Crashplan Home RIP

With Crashplan Home on the way out I’m in a bind. I was using it to backup my Dad’s laptop to my machine. It was so very handy as it was plug-and-play. Fire up the app on his machine, type in the code and it started sending over his data whenever he was online, wherever he was. All that comes to a screeching halt in October 2018 when Crashplan drop their Home product.

I’m not sure what I’ll replace that with. I’m tempted to try Backuppc, and setup dynamic DNS on his router, but it’s a Windows machine, which is always a complicating factor. Maybe I’ll try that Backuppc Windows Client but all I need are a local ssh server and rsync, right? It might just be simpler in the long run to use Backblaze however. They even published a blog post to encourage Crashplan customers to migrate!

Besides using Crashplan for my Dad’s backup, I also used it to keep versioned copies of my photos directory on a separate external drive, but I zapped that and installed rsnapshot on my Macbook using Homebrew, and configured it to back up every few hours. It’s working fine so far too, and the simplicity of rsync and hard links is comforting. Sort of like Time Machine you can use Finder to navigate through the backups, and copy files from it to restore them. As an added bonus it’s not running in the background the whole time. A cronjob fires it up on a regular basis.

If that all sounds too technical, just use Backblaze. I’ve been with them for years, and recently renewed for another two years. If you want to get a month free (after signing up following the free trial) you could do worse than sign up using this signup link. I currently have over 2TB of data backed up there and it’s still going strong!

Edit: Over on /r/datahoarder there’s a lively discussion about Backblaze, including a rep from the company answering questions. Also, I’m not the only one looking for a replacement for PC to PC backup.
Edit 2: I wonder if Syncthing could be a replacement for PC to PC backup. The Backups aren’t encrypted unfortunately, but it has support for file versioning now which is a plus.

Remapping the Keyboard on a new Macbook Pro

I must have an odd keyboard, at least for one that’s paired with a Mac. It’s a Microsoft split keyboard and has a bunch of extra keys that aren’t on a Macbook Pro keyboard, like a dedicated # key and the keys are all over the place compared to the laptop keyboard. But I like it that way.

I’ve heard comments from people who use my laptop and they are confused by how shift-2 doesn’t print @ but ” instead, and the key by the left shift prints \ instead of ~ (which is over by the Return key). They’ll say, “Oh, it’s some sort of PC keyboard?” Well, yeah.

This is not the first time I’ve had to fix my keyboard. A long time ago Justin Mason created a useful Irish Fixed Keyboard Layout, but for some reason with this latest hardware upgrade it wasn’t working exactly as planned. The #, \ and ` keys were mixed up. Luckily, with the help of the Key Codes app I could detect the the key code of the physical key pressed. For example, the key next to the left shift is key code 10 so it was just a matter of editing the keyboard layout in a text editor and changing that to output “\”. Logout and login to refresh and the key works!

What’s odd, is that this keyboard layout has served me well for almost a decade and didn’t need editing, which is why I’m documenting it in this post.

I looked at both Ukelele and Karabiner but the former looked overwhelming (yeah, then I went editing XML by hand..) and the latter doesn’t work in macOS Sierra (there’s a simplified “elements” version for Sierra). Then I thought I should just edit the keyboard mapping directly. 🙂

Etch a Sketch, a Tribute

My colleague Mark found this amazing tribute to the inventor of the Etch a Sketch, André Cassagnes. It’s some sort of magic I think because I could never draw anything on one. My son recently bought “the smallest etch a sketch in the world” which is a tiny device but he’s having fun with it.

Then there’s this amazing artwork done on the little red box. How?

If you want to know more, the Wikipedia page on the subject has tons more information.

3 months free Backblaze again

A long time ago in 2013 Backblaze had a “sign up and get an extra three months free” offer and they’re back at it again.

For the next 32 days. click on this Backblaze signup link, you’ll get started on a free trial for a month to test it out, but if you decide to pay you’ll get an extra three months.

I love the Backblaze service. It’s a cloud backup service where you can backup your files. I won’t go on and on about it. I did that in my 2013 post, but if it’s any indication of how good they are, I’m still a customer all these years later with over 2TB of data backed up there now.

The signup link is an affiliate link of course (I get three months free as well if someone signs up) but if you don’t want to use it and don’t want that extra three months sign up through this link instead.

And to think, I used to rely on backing up my photos to CD..

Sky obviously never check their customer surveys

Someone used my gmail address when they signed up for Sky Television. They must have lots of spare time and money to burn as they’re getting the “Variety with Sports & Movies” package at 83 Euro a month. Yikes.

I filled in the Sky customer survey a few times but they appear to have been ignored. One more time then.

Their emails aren’t really helpful, but Gmail does somehow know how to unsubscribe from Sky emails. I’ve sent Sky a reply telling them they have the wrong email for this account. Updates in the comments if I hear back from them!

You received this because you enquired about subscribing or subscribe to Sky. If you have received this email in error, please accept our apologies.

Sky Survey

Sky Survey Results