Posts about how-to

Saving and Restoring GCP instance snapshots

This post lists the full steps for how to snapshot/restore a Google Cloud Platform (GCP) compute instance, illustrating a few things that might relieve some frustration about performing this "simple operation" in the Googleplex.

Recently I was making a lot of changes to some GitLab virtual machines as I learnt about setting up GitLab Geo, and often I would make mistakes and need to start over. This is very doable with virtual machines managed through infrastructure-as-code with Terraform and Ansible, as we do with the GitLab Environment Toolkit, but it does take about 25 minutes to spin up each new virtual machine and install GitLab.

Twenty-five minutes is amazing compared to doing it all by hand, but I felt it would be faster to use snapshots of the machine instead:

  • Build new machines for Geo primary and secondary
  • Snapshot them before making the tricky changes
  • and then if one breaks, restore the snapshot.

The virtual machines are GCP compute instances, so I needed to learn how to do this with the gcloud compute command-line interface to GCP.

Read more…

Loading Geocache Pocket-queries on TomTom XL

We're back from a two-weeks family trip to Victoria, along the Great Ocean Road. We planned to do some GeoCaching along the way and we even purchased a store-display model Magellan eXplorist 510 which has support for paper-less caching. It's great, if a bit heavy on the batteries.

The trip was so epic and busy, and we did so many things along the way that we barely had time to stop for caches - we only found six! But it was still a fun diversion.

This article's about the TomTom XL though, our venerable old in-car sat' nav', which needs a little help to do GeoCaching. The device dates from around 2006/2007 I think. Before our trip, we purchased a (long overdue) map update for it, and then the night before we left home I sat down for a bit to re-learn how to upload caches into it as Points Of Interest. This makes driving to the nearest cache much simpler because the TomTom can plan the route. Or else you will see caches popping up along your way if you have a different route already planned.

Read more…

Import Library eBooks into Kobo

I was asked by my neighbor (a second time) to help importing eBooks that she downloaded from the state Library into her mother's Kobo eReader. Much scratching of heads and drinking of tea ensued, but we sorted it out, in the end. This post describes some of what I learned, though not the DRM bit: we worked that out the first time and it was so painful I have driven it from my mind.

Read more…

Resetting Firefox

I just survived my first Firefox Reset and lived to tell about it.

I was experiencing some weird cross-site stuff for one of work's web tools, and decided to give Firefox's Reset a try. It actually worked!

My concern was that, because it deletes all your add-ons and customisations, I would lose them. Fortunately, I also use Firefox Sync already. So that meant, after Firfox had cleaned itself up, it re-downloaded all my custom goodness and re-installed it.

One caveat: you do have to Restart Firefox after Sync has done it's bit to re-install Addons. After that, everything is as it should be. Hurray.

The steps to Refresh Firefox are:

  1. Go to about:support
  2. Press the Refresh button in the top right
  3. Wait for Sync to finish (you can check how it's going by looking in about:addons to see if your Extensions are all there yet)
  4. Restart Firefox (either from the addons page, or by pressing Alt-F2 and typing restart)

Loading SSH keys at KDE startup

It's really handy to have all my SSH authentication be passwordless, but in a secure way. In openSUSE, the ssh-agent is started for you automatically, but you still need to add your identities manually (and enter passphrases when you do this). That's a bit of a pain to do every time you login.

Here are some simple scripts and steps I use to set up my KDE session so that it will automatically load my SSH identities when I login.

Rotate screen KDE shortcut

We have a few spare monitors laying about at work, and I just grabbed one with a rotating stand, so I can switch it between Landscape and Portrait. This is nice, because it's got more pixels than my laptop's built-in screen, and it's also larger.

It's also very handy when viewing pages that are narrow and tall.

All I need now is a way to quickly switch the screen's orientation without digging through a GUI. This looks like a job for xrandr and KDE's Global Keyboard Shortcuts

Read more…

Build and install Emacs24 on Debian squeeze

Hacking in Debian is so easy (one of the reasons I switched). Take, for instance, building Emacs. This is such a piece of cake compared to the weird hoops you have to go through to get all the build dependencies on other platforms. It's something I never tried before, simply because it was too daunting trying to figure out all the packages I need to install. But apt-get has this awesome --build-deps switch...

Read more…

Implementing a caching-only DNS on openSUSE

Lately I've been noticing significant DNS latency when visiting certain sites. This is most obvious when my browser spends ages with "Looking up some.web.server.com..." in it's status bar. It's particularly bad at sites like wordpress.com where many pages make reference to sub-domains of wordpress.com and typically also to google.com for analytics or ads.

While my ISP's DNS infrastructure is pretty good, there are a couple of things I can do to improve DNS look-up, which makes page loads a lot quicker.

Read more…