Howdy!

Welcome to my blog where I write about software development, cycling, and other random nonsense. This is not the only place I write, you can find more words I typed on the Buoyant Data blog, Scribd tech blog, and GitHub.

The cost of power in northern California

From my perspective one of the most important steps to address climate change is investment in cleaner power generation. Imagine my displeasure when I started doing the math on some of my recent power bills. Where I live Pacific Gas and Electric (PG&E) is the predominant utility company but fortunately I am also able to purchase electricity from Sonoma Clean Power. Nevertheless, I still receive a bill from PG&E which is the owner/operator of most if not all of the transmission and generation capacity in the region. In Northern California there is no love lost for PG&E, which has been found responsible for negligence leading to numerous wildfires, gas pipeline leaks, and explosions. Much of this negligence has been due to postponing of forfeiting maintenance in order to recognize higher profits. To add insult to injury, it seems like they skim a healthy margin off of residential producers/consumers as well.

Read more →

How sudo gets root

Today I fell into a rabbit hole around user and process permissions and had to learn how sudo actually worked. For the program I was working on I set out to figure out how to perform something akin to a “user swap” when launching subprocesses. On its face it seems simple enough, my program runs with user id 1000 and I wish to shunt child processes over to run as another user id. sudo can do it, so why can’t I? “For reasons” is the answer.

Read more →

Accessing Handlebars variables in an outer scope

This weekend I learned some unfamiliar behaviors with the way Handlebars handles nested variable scopes. I typically use Handlebars via the handlebars-rust implementation which aims to maintain nearly one to one compatibility with the JavaScript implementation. They have block scope helpers such as #each and #with, both of which create an inner scope for variable resolution. Unfortunately, the syntax can be quite unintuitive for accessing outer scope once in those nested scopes.

Read more →

Finally figured out those inline Rust errors

Vim can be used as an IDE of sorts for Rust by using a variety of plugins, that don’t always play nicely together. A few weeks ago while I was hacking on some Rust and these errors started showing up inline. Blaring red text basically as soon as I was done typing half-finished thoughts.

Read more →

Remember FastCGI?

“Serverless” is sometimes referred to as “cgi-bin” which isn’t entirely fair as it’s somewhere between cgi-bin and FastCGI. Somewhere along the way both faded from memory. While goofing off last weekend wondered to myself: is FastCGI still useful? Unlike the classic cgi-bin approach where a script or program was executed for each individual request, FastCGI is a binary protocol which allows for longer lived processes serving multiple requests. It continues to be used in the PHP community but seems to have largely fallen out of favor. Nonetheless I decided to tinker a little bit with FastCGI in Rust.

Read more →

Increasing the density of the home lab with FreeBSD Jails

Investing the time to learn FreeBSD jails has led to a dramatic increase in the number of services I run in my “home lab.” Jails, which I have written about before, are effectively a lightweight quasi-virtualization technique which I use to create multiple software-defined networks to segment workloads. Jails have allowed me to change my “home lab” dramatically, allowing me to reduce the number of machines and increase hardware utilization. For now, the days of stacking machines, dangling Raspberry Pis, or hiding laptops on the shelf are all gone. Almost all my needs have been consolidated into a single FreeBSD machine running on a 4 year old used workstation.

Read more →

Ransomware is coming to a cloud near you

Ransomware is the most significant and dangerous evolution of computer-based crime I have seen, and it’s going to get worse. Ransomware attacks have compromised oil pipelines, hospitals, and beef. While they’re nothing new over the past two years, targets have become increasingly high-profile and the adverse impacts of ransomware have similarly become more dire. Based on my read of the reports and incident reviews, these attacks seem to largely be affecting physical infrastructure assets: workstations, servers sitting in closets, and small-scale data center operations. Given this trend, it might be easy conclude that running in AWS, Azure, or Google Cloud offers some level of protection. I strongly doubt it, and I think ransomware is about to get worse.

Read more →

Vaccinated

Everything went fine. Social media is awash with anecdotes about getting vaccinated, side effects, and opinions about other people becoming vaccinated. I recently crossed the waiting threshold after my last dose and felt I should share my experiences as well.

Read more →