Common-sense security for SSH on a new Debian server

Last night I went to DigitalOcean and spun up a tiny new, $4/month droplet – on my own dime! It sounds crazy, but I’ve never actually wanted to pay for hosting myself before. But I have a fun little web app cooking up, one that might eventually pay that $4/month back with interests, and I decided, why not, it’s time to finally put some of my own skin in the game with this whole sysadmin thing....

September 24, 2024

PHP, Go, and Braindead Deployment

If you’ve been following my posts recently, you might have noticed that I’ve been working more and more with PHP lately. As someone who was curiously allergic to web dev as a teenager, it has been a strangely healing experience for me. I’d like to say it’s because my experiments with Laravel, the only OSS work of which I can point to is testing the Homestead VM’s compatibility for Shell Bling Ubuntu, convinced me....

September 16, 2024

The highest personal ROI program I have written so far

It would have to be finstem, a simple command-line program I wrote to reduce Finnish words down to their root form. Finnish is a lot like Latin or Russian in that its words often become lumbering behemoths of rewritten consonants, suffixes upon suffixes, and this makes it hard to look up in a dictionary – that is, until you factor in its very regular orthography and the phenomenal efforts of the Finnish programming industry: finstem is basically a very specialized UI for the OpenOffice spell checker, and I have no shame in admitting that....

July 30, 2024

Layers of abstraction for me, not for thee

Consider the problem of “how do I run more than 1 terminal at a time”. At this moment, I have at least 5 different ways I can effectively solve this issue: I can, from a different physical computer, SSH in to a new session. I can, from the same physical computer, switch to a different tty session with … C-S-F2 through 6 or something. (Rare, but sometimes it comes in really handy....

June 18, 2024

Trackballs are great for the mostly-mouseless

I was 100% mouseless back before it was cool. Between dropping out of high school and enrolling in community college, I replaced my laptop with a $80 HP EliteBook I found on eBay; when I discovered its trackpad didn’t work anyway, I went all in on a no-X setup. I eventually concluded that going 90% mouseless got me almost all of the benefits, with almost none of the downsides. It’s almost as if returns are usually diminishing!...

May 26, 2024

tmux is worse is better

tmux (short for “terminal mux” (short for “multiplexer”)) is i3 for your terminal. Oh, it’s so much more than that, and I recently discovered with some joy that it is installed by default on OpenBSD, but its fundamental value add to any programmer who has to SSH into servers more than once a week is it allows you to split your screen up into multiple independent shells without needing a graphical environment at all....

May 23, 2024

PHP is Web Shell

One of the cooler things about working in a firm founded and run by a lot of dyed-in-the-wool Linux hackers like my current place is that there is a lot of Bash lying around, accumulated over a good 25 years or so. For all their faults, pure shell solutions still set the silver standard for programs which appear almost entirely immune to bit rot. But you know what? So does vanilla PHP....

April 29, 2024

fd + xargs + bat = quick document review

I’ve been on vacation this week, and part of what I’ve been up to is fixing up the Selkouutiset Archive. Like most of my websites these days, SA is powered by Hugo, which means handling a lot of Markdown documents, which means I opted to use an intermediate Git repo as a submodule to actually store the custom-processed documents. After a few tweaks here and there, I found myself wanting to quickly flip through all of the Markdown documents I had generated for each news day....

February 25, 2024

Getting `fzf` to print the preview pane

fzf is an incredibly useful bit of software, if someone shows you how to use it. There’s a lot more to it than just fuzzy-switching directories and fuzzy-searching you shell history – it also comes with a preview pane that updates on every keystroke. Try 1 echo '' | fzf --preview 'echo {q} {q}' and typing something to see how it works. ({q} is the query you type in at the bottom of the screen....

December 6, 2023

Git aliases for fun and profit

haskell-kata’s Quickstart now has this neat little ditty at the start: 1 2 git config --local alias.build '!sh -c \'for file in *.hs; do ghc -o "${file%.hs}-bin" "$file"; done\'' git build Git is the gift that keeps on giving. I was on the hunt for a subdirectory-scoped alias, and I just discovered this incredibly flexible way to create new Git subcommands. History: 2 years ago I read through the 1200 page behemoth Haskell Programming from First Principles....

December 3, 2023