Author: David

Loading test data with Play Framework Evolutions

comment 1

In a previous article I described how to load test data that your ScalaTest Play Framework functional tests might need using Play Framework’s Evolutions. This made use of the SimpleEvolutionsReader class and defining evolutions in the test setup code. Recently I wanted to also load some test data from a file and so turned to the ClassLoaderEvolutionsReader class which loads resources from the class path. The trouble was I wanted to apply the schema from […]

Jumbled Headers

Leave a comment

Have you ever noticed misspelled HTTP response headers? $ http -h HTTP/1.1 200 OK Connection: close Content-Encoding: gzip Content-Language: en Content-Length: 9907 Content-Type: text/html;charset=UTF-8 Cteonnt-Length: 33416 Date: Tue, 12 Apr 2016 12:26:06 GMT Server: Apache That ‘Cteonnt-Length’ sure looks weird! According to this StackOverflow answer, the jumbled header contains the uncompressed size of the response and, sure enough, it does seem to be the case. But why? It seems like this is a trick […]

Back up your server to Backblaze B2 with Duplicity

comments 3

Amazon S3 has been around for more than ten years now and I have been happily using it for offsite backups of my servers for a long time. Backblaze’s cloud backup service has been around for about the same length of time and I have been happily using it for offsite backups of my laptop, also for a long time. In September 2015, Backblaze launched a new product, B2 Cloud Storage, and while S3 standard […]

Oops! I committed to the wrong branch

Leave a comment

It is common when working with git to use lots of branches. Occasionally you might accidentally commit to the wrong branch but thankfully git makes it easy to put these commits in the right place. It’s worth noting that the fixes described here are only for when you haven’t pushed anything to a remote branch otherwise you will be changing history that someone else might have already pulled.You don’t want to do that. There are […]

Time zone conversion in Google Sheets

comments 55

Google Sheets does not have a built in way of converting time zone data but by using the power of Moment.js and Google’s script editor we can add time zone functionality to any sheet. First, we need to add the Moment.js code as a library that can be shared between different documents. This is the javascript library that adds date and time zone manipulation support. A good way to do this is to create it […]