I was recently inspired by the terminal-based business card fad started by @bitandbang back in December: Updated my business card 😎 pic.twitter.com/psqZQ9pj4L — Tierney Cyren (@bitandbang) December 19, 2018 The npxcard package certainly would have made it trivial to make my own, however being the ornery sort that I am I decided instead to scratch make a Go-based version which could respond to a curl request. I wound up making multiple packages to do so, mostly because I could imagine myself expanding on some of them further in directions more and/or less focused on terminal-based business cards, though it’s unlikely I will.
If you have a project that requires frequent Docker builds & pushes to a Kubernetes cluster, it can be pretty frustrating to come up with a suitably hands-off build+deploy step. After developing on several such projects I’ve come up with an easy system that relies on minimal tooling, making it portable and easy to customize to an individual project’s needs.
A toy project I like to fiddle with is a person URL shortener. Right now I have an old
URL shortener on zikes.me to which I added some logic to the routing, such that certain
paths would lead to administrative areas while others would be treated as shortened URL
keys. This was pretty hack-ish, and I’d like to be able to use
/anything as a key
without worry. That meant either a separate administrative process, an API, or somehow
serving a separate admin area via a subdomain, like admin.zikes.me. The third option
sounded ideal, as keeping the admin within the same process should keep the code pretty
In an attempt to continue doing things right, I’ve put my blog in a git repository. I considered putting it on Github, whether public or private, but honestly I’ve been looking for an excuse to set up my own personal Git server. Normally I’d go with a self-hosted all-in-one system like Gitlab or gogs. We use Gitlab at work, and I love the minimal resource usage of gogs, but for now they’re just overkill for what I need.
In an effort to make blogging more painless, I’ve set up some conveniences.
First, per a recommendation from Hugo’s documentation,
I made a
deploy.sh script to make the build & upload process nice and simple.
Everyone loves parsing XML files, right? The inconsistent formatting, undocumented fields and attributes, they’re always a hoot. If you’re especially unlucky, you’ll also come up against invalid Unicode characters that cause the parser to choke, as I did recently:
2017/01/24 11:28:06 error parsing data/201701182200040_58647400_2.xml: XML syntax error on line 96: illegal character code U+001E
One of my initial concerns with using a static site generator was managing related
content files. Some posts may have related post-specific images, or scripts, and I
didn’t want to have to manually organize them in
/static subfolders. Ideally, they
would live alongside the post’s own