January 3, 2018

JavaScript asynchronous functions and error handling

Filed under: Technical — Tags: , — James Bunton @ 9:37 pm

What is asynchronous I/O?

The web services I build spend most of their time doing one of these two classes of things:

  • Processing – Burning CPU cycles calculating things. For example JSON parsing, HTML rendering, image processing, etc.
  • I/O – Waiting for some event external to the CPU/RAM system to finish. For example an HTTP request or DNS request.

(more…)

June 1, 2017

Capturing and restoring video from VHS tapes losslessly

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

Back in the 1990s my family recorded some home videos using a VHS camera. It’s pretty hard to play these on modern equipment, so back in 2013 I digitised them all.

Of course when using an analogue source like tape it’s not really possible to do a lossless copy. However I wanted to do the highest quality capture with the equipment available to me, and I wanted to be able to redo post-processing in the future in case I have the time, motivation and technology to improve things further.

(more…)

May 1, 2017

Caching reverse proxy for Linux and OSX software updates

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

I have lots of computers in my house, all of which receive regular software updates. I get tired of waiting for all of these to download the same data, sometimes at the same time! I decided to use nginx to cache this data on my router to save time.

(more…)

April 1, 2017

Back to base alarm monitoring using VoIP

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

The new FTTN NBN is rolling out my area pretty soon. Switching over from my current ADSL2+ connection will mean disconnecting my analogue phone line, so I’ll need some other for my back to base alarm to contact the monitoring station.

I’ve managed to set this up with the Cisco SPA112 ATA and Nodephone.

(more…)

March 21, 2017

Using colon filenames with Samba 4 on Arch Linux

Filed under: Technical — Tags: , , — James Bunton @ 12:05 pm

A little while ago I upgraded Samba from 3.14 to 4.1. I’m using Arch Linux on the client and server. This upgrade broke the ability for the client to access files containing colons, that is I could not read files with names like 2016-01-01 10:42.txt.

(more…)

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…)

Older Posts »