Can’t Hack It

An attempt at public introspection

Hacks

RIP, spinning rust…

· 2min

Last time, I got my old Dell Mini 12 up and running again. Well, the fates did not smile kindly on me, and through my own clumsiness, it ended up slipping off my lap, leaving it with some very, very unhappy spinning rust.

And yes, it contains a regular HDD …

Hacks

Notes on breathing life back into a Dell Mini 12

· 8min

(These are some rough, unedited notes from when I was rebuilding the machine today.)

I have a Dell Mini 12, and while I’m pretty sure it’s never going to be of much practical use, I’d like to restore it to a state where it might be useful …

Hacks

Fun installing NetBSD 9.0 on a Raspberry Pi B+

· 6min

One of the consequences of being on a lockdown is that you find time to do things you’ve been putting off for a while. One of mine is setting up a small bastion server on my home network. Having already set up dynamic DNS with Duck DNS, I found …

Life

Ending 2019

· 5min

Following on from last year’s post, it’s time to re-examine where I am in my life once more.

The good

My weight has stayed surprisingly stable over the last year. I’m still overweight, and I’ve yet to hit my goal of getting below 70kg, but the …

Coding

Creating AWS Lambda functions in Python with dependencies

· 1min

This assumes you have a package called mylambda and a requirements.txt file listing your dependencies.

build.sh:

#!/bin/sh

tmp_dir=$(mktemp -d)
trap "rm -rf '$tmp_dir'" EXIT

pip install -r requirements.txt -t "$tmp_dir"
cp -R mylambda "$tmp_dir/mylambda"

here=$(pwd)
(
    cd $tmp_dir
    zip -r -9 $here/lambda.zip …
Systems Administration

Bootstrapping development VMs with Ansible

· 5min

I often need VMs set up locally for development purposes. Setting these up manually can be time-consuming and error-prone, so I use Ansible to almost entirely automate the process.

[Aside: This post assumes you know how to use Ansible, and also doesn’t go into a tonne of detail on …

Life

On asking for things

· 7min

I’ve had variants of this stuck in my drafts for a while now. It’s time I sat down and wrote down what’s been on my mind.

First of all, go read Salary Negotiation Tips from White Men in Tech (and part 2). It had been on my …

Health

Becoming two thirds the man I was

· 9min

Note

I’ve had a post sitting here, waiting to be finished for almost three years. It concerns my previous attempt to fix my weight issues. There’s no sense in trying to post it now, but I might work it into a few different posts. There’s some stuff …

Life

Ending 2018

· 5min

It’s coming to the end of the year, and I figure it’s a good time to review what went well over the past year, what went poorly, and how things can go better.

The good

First up, and most important, is that I found a few great friends …

Advent of Code

Advent of Code 2018, Day 3

· 2min

Part 1

There’s some parsing needed on the input file, and because there doesn’t seem much point in writing the parsing code myself, I used the text_io crate.

Also, I needed some representation of the rectangles, so I wrote a simple implementation with some tests for a method …

Advent of Code

Advent of Code 2018, Day 1

· 2min

Part 1

Very simple. Just a matter of summing up the lines.

Given this is the first time I’m writing non-trivial Rust, I ran into a small issue. Initially, my main function used the default return type of (), so when I compiled my code, I got this:

warning: unused …
Advent of Code

Advent of Code 2018, Day 2

· 5min

Part 1

This one has us applying a simple algorithm to a list of strings to extract some characteristics of a string - specificially, whether a given string contains exactly two or three of any letter - then summing up how many each of these characteristics applies to the strings, and multiplying …

Life

Starting again

· 3min

I haven’t posted here in two years. This site was meant to be a way for me to start writing something more than post random crap on Twitter. I’ve failed at that, but I’d like to try again.

Note

What’s written above was accurate when I …

Tech

Getting Ubuntu up and running on a Lenovo Miix 310

· 3min

Back in January, I picked up a Lenovo Miix 310 a while back to play with Windows. It was an interesting experience, but I really can’t see myself shifting my development over to Windows any time soon, so I figured I’d throw Xubuntu on it and see if …

Language

Esperanto orthography is terrible

· 5min

The orthography of Esperanto is terrible. Not as bad as, say, English or French, but pretty bad. It needn’t have been this way, though, as it’s so very close to actually being good.

Many screeds against Esperanto orthography will point to its use of diacritics, but this is …

Django

Custom attribute values in Django form field widgets

· 1min

This has frustrated me for so long.

If you want to use checkboxes in a form in Django, the obvious choice is BooleanField. There are times it would be really useful to have the value attribute filled out, but by default, Django just checks for the presence of the field …

Tech

Progression of mail management on a Debian box

· 1min
  1. Ah, I just need to deal with local mail, so I’ll have Debian configure Exim for that. After all, it’s already there.
  2. Huh. Seems I need to send some mail from this box. I’ll have Debian reconfigure Exim to use a smarthost for non-local mail.
  3. Huh. Seems …
CSS

Centring blocks with CSS

· 2min

Some good friends of mine got married recently, and I helped out with the site for the wedding. One of the things that needed to be put up on the site was a poem. Now, just dropping the text of the poem into the page as-is would look weird; poems …

Coding

What monads are

· 2min

It’s almost like a rite of passage for a developer to write a monad tutorial.

Well, this isn’t a monad tutorial. This is simply an effort to put an end to some of the nonsense that leads to monad tutorials being written in the first place and all …

Coding

How I use git

· 3min

My git workflow for anything non-trivial is pretty straightforward, but a little different from what I’ve seen others describe. I’m almost certainly not the only person out there who uses this workflow, so I’m certainly not claiming any originality.

There seem to be two camps, both based …

continue   →