August 15, 2016

Quickly remove read-only web page form fields with a bookmarklet

Filed under: Technical — Tags: , , , — James Bunton @ 9:11 am

It’s somewhat common for some web pages to require that you enter your password by clicking buttons instead of using a regular form input field. For example the loans.com.au login screen does this.

The stated reason is usually security. However we should all be using password managers anyway, so this is quite annoying.

(more…)

August 1, 2016

docker-cleanup to garbage collect old images

Filed under: Technical — Tags: , , , — James Bunton @ 12:00 am

Docker is a very useful containerisation platform. I use it so much that I regularly fill up /var/lib/docker with old images and get out of disk space errors. Unfortunately Docker has no automatic garbage collection mechanism to clean up unused images. I wrote a simple shell script which I run from time to time.

(more…)

July 14, 2016

Understanding ‘this’ in JavaScript

Filed under: Technical — Tags: , , — James Bunton @ 10:27 pm

I believe the behaviour of the this keyword in JavaScript is one of the most confusing and poorly thought out parts of the language. If you understand how objects and classes work in some other language, but don’t understand why JavaScript behaves weirdly, this blog aims to help you out. By the end you’ll understand how this works and how to make it work for you.

(more…)

May 1, 2016

Fixing PAL speedup and how film and video work

Filed under: Technical — Tags: , , , , — James Bunton @ 12:00 am

I have a large collection of DVDs and I live in Australia. Because of history this means most of them are in ‘PAL’ format. This means they tend to be about 4% faster than they should be, resulting shorter playing times and higher pitched voices and music.

I’m a bit of a purist. This bothers me enough that I must fix it! What follows is a somewhat lengthy explanation of how film/video works, followed by instructions on how to use my fix-pal-speedup script.

(more…)

April 1, 2016

Tool to get your Opal card travel data

Filed under: Technical — Tags: , , — James Bunton @ 12:00 am

The New South Wales public transport system uses the Opal smartcard as its payment mechanism. This means their servers store every trip that you make, including the start/end times and locations.

They need this data for billing, so there’s not much we can do about it from a privacy point of view. However you may be interested in getting your own copy of your data for making pretty graphs or other analyses.

(more…)

March 18, 2016

Safe bash scripting: ‘set -e’ is not enough!

Filed under: Rants,Technical — Tags: , — James Bunton @ 10:53 pm

I know, I know, shell scripting is a bad way to write software. I’ve always had a bit of a soft spot for bash though. Sure there are plenty of gotchas in bash scripting, but isn’t that the case for every programming language?

(more…)