Getting feature parity on Internet Explorer is never very fun, or easy. I recently worked on a project where we needed to support inline downloads - specifically, a generated CSV string, as a file in all greenfields browsers as well as IE9-11. Fortunately, IE 10 and 11 support the Blob API, which make downloads pretty simple using the ‘msSaveBlob` non-standard...
This trip report covers a fantastic day loop that I found to be a little under-documented when researching - especially the East Holdsworth track, which has become one of my favourite Tararua tracks. Started: 9:15am from Holdsworth Carpark Finished: 4:50pm at Holdsworth Carpark Times: 1hr up Atiwhakatu Track 2.75hrs up East Holdsworth Track 20min to Mount Holdsworth Summit 30min from...
I’m a big fan of keeping strings out of my application code. It’s a pattern I first came across with Android string resources, and since then I’ve been using tools just like the i18n gem to abstract content away from code. Something mentioned directly in the Rails I18n guides that I really like to see used myself is the built-in...
I was listening to Episode #107 of the Syntax Podcast this afternoon, which covered CSS units, and was inspired to actually stop and think about how I use units when writing CSS. I felt pretty reassured that generally my approach is in line with what Wes and Scott were discussing. Let’s go! rem I use rem by default for most...
After my failed 2017 attempt to reach Renata Hut, I finally mustered up the spare time and inclination to have another shot. The TL;DR of the last attempt is that due to significant tree fall on the track, it took me too long to make it up to the Hut - I reached my cutoff and turned around. After that...
Just a quick one - I use grep all the time to find matches for text in files. Sometimes I’m not really interested in exactly what matched, I just need a list of files that matched SOMEWHERE. This morning I found that the -l option with this (or --files-with-matches). From the man page: -l, --files-with-matches Suppress normal output; instead print...
Deserializing JSON from API responses, files and the like is a pretty common task. Depending on the complexity of the JSON structure, this can be a bit difficult to work with though, since the default action of JSON.parse is to deserialize to a string-key Hash. This means that after parsing the JSON, there’s a lot of fetching, diging, and the...
This post covers an incremental implementation of the Exercism “strain” exercise that I worked on collaboratively with one of my colleagues at Ackama, Daniel Jauch. The Strain exercise brief is to implement keep and discard functions within an Elixir module named Strain, without using the Enum.filter module, for example: iex> Strain.keep([1, 2, 3], fn e -> e < 10 end)...
I have been using this snippet recently to show the amount of memory currently being consumed by each Unicorn worker. This is a convenient way of checking: The expected number of workers is being run The memory usage of workers is fairly uniform The average memory usage of Unicorn workers (if you are considering adding or removing workers) Here’s the...
A little disclaimer: These notes are mostly for me to refer back to in the future, and are based on quick handwritten notes I took at the conference. They shouldn’t be used as a general reference since I may have misquoted, misremembered, or ventured an opinion that isn’t quite right. My DevOps ticket was funded by my employer, Ackama. DevOps...