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

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

July 29, 2015

bashttpd – the Bash HTTP server

Filed under: Technical — Tags: , , — James Bunton @ 8:11 pm

So I was bored on the bus trip to work this morning. Back in Uni I’d thought about whether it would be possible to write an HTTP server as a shell script for bash. So I did it! Presenting bashttpd.

(more…)

July 15, 2015

Monitoring hard disks and alerting on errors with smartmontools on Linux

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

A simple configuration to regular check all local disks for errors. Any problems will go to syslog/journald as well as being emailed to root.

(more…)

July 1, 2015

IPv6 with over ADSL with PPP on Debian Linux using Internode

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

Many years ago Internode started offering IPv6. This is proper dual stack IPv6 with a /56 block of addresses. I get 256 subnets, each with 2^64 addresses. Awesome! I signed on for the trial immediately and got it working without too much difficulty. The documentation wasn’t great though, so here’s how I my setup works today.

(more…)

Older Posts »