The Quiet Joy of Simplicity (RFC 868)

I recently discovered the Time protocol, as defined by RFC 868. This delightfully simple RFC, if implemented, returns an unsigned 32-bit integer as bytes, then disconnects. That integer represents the number of seconds since 1900-01-01 00:00:00+00:00, the epoch stated in the RFC. That’s it. That’s the entire thing. NIST maintains this delightfully Web 1.0 page where they state that they service Time requests on port 37 (though they’d prefer you to use NTP). This, in fact, does work: ...

2025-04-05 · 3 min · Stephan Garland

Safely Saving Secrets

Because alliteration. Moving on. If you’re interacting with APIs of any kind regularly, you probably have the credentials saved somewhere. Maybe you’re already using a solution to securely store these, in which case congratulations, you’re better than most. I, for one, was not. I assuaged my guilt with the knowledge that my Mac’s disk encryption meant that they were protected, but the whole thing still felt icky. This was briefly discussed in Slack, and this method of dealing with the problem came up. In short, it uses 1Pass to store secrets, and their CLI to access them and load them into the shell environment. That was all well and good, but I wanted a way to programmatically create the entry in the first place. 1Pass’ templates are JSON, so this wasn’t overly difficult with the help of jq. Download the CLI here. ...

2020-11-10 · 4 min · Stephan Garland

Terraform 0.11.x --> 0.12.x

Anyone in the SRE/DevOps world is likely at least aware of Terraform, if not actively using it. While Pulumi’s ability to write IaC in Python seems lovely to me, my company uses Terraform, so HCL it is. If you aren’t familiar, I’ll give a brief overview. Terraform is an IaC (see link above) tool. You know how installing an OS from scratch requires human input? Everything from the partitioning scheme to what services to launch requires configuration. What if you only had to write that down once, and then it could be replicated? What I’m vaguely describing is actually more of a mix of (sticking with Hashicorp) Terraform and Vagrant, but the basic idea is the same: write - in some standardized language - what you want your end result to look like, and it can then be applied over and over achieve that result. This is called declarative programming, and it’s utterly different from what most people are used to writing. Anyway, back to the topic. ...

2020-08-04 · 9 min · Stephan Garland

But I thought Docker fixed dependency hell...

For a school project, I had to install mongoDB. OK, no big deal, docker pull mongo. Since I run a home server, and the purpose of this mongo installation was to create an app that uses it, I figured installing it there and making it available to the rest of my group would be beneficial/helpful. Hmm, might want to also install some kind of GUI management tool - nosqlclient looks like it’ll work. It’s also containerized, so even better. ...

2019-08-27 · 4 min · Stephan Garland

New Environment Setup

UPDATE: See the end of this post for a discussion on new revisions. Every Professional Computer Toucher has a just-so way they want their environment. When I was but a wee lad, that environment consisted of Windows XP with various arcane registry tweaks applied (I vaguely recall changing my TCP congestion control algorithm to Westwood solely because of Red Alert 2), and Notepad. Things improve with age. My current environment is a non-Retina Macbook Air, which suits me just fine. *nix OS, with homebrew filling in the gaps. I use Atom (once you get past the abysmal load time, it’s basically Sublime Text), and iTerm2 with zsh. You may note in a previous post that I extolled the virtues of fish. Well, I got tired of its lack of POSIX compatibility, and having to rewrite every script I downloaded. I toyed with the idea of writing a fish-to-zsh transpiler, but decided the better option was to make zsh like fish. ...

2019-08-03 · 6 min · Stephan Garland