It's a Low Bar for 2022

2020 and 2021 have set a really low bar for 2022.

Low bar for 2022

It's a really low bar for 2022.

I don't think I'm alone when I say that 2020 and 2021 have set some low expectations. However high or low you're setting the bar for 2022, I hope you clear it.

List All Installed NPM Packages and Versions

Multiple NPM packages were hit by supply chain attacks recently: ua-parser-js, coa, rc. How can you check your installed NPM packages for an affected version?

jq logo

jq can be used to query NPM package data

If you follow IT security or even general IT news, you've likely read about the recent supply chain attacks against multiple widely used NPM packages. First, we saw a compromise of UAParser.js (ua-parser-js). That was followed by back-to-back hijacks of the Command-Option-Argument (coa) and rc packages. The affected versions of each package are well documented:

Open Source Software Explained

Open source software powers the modern world. Take a non-technical dive into the basics of open source, explore its appeal, and discover its significant impact.

After more than 20 years in the software industry, the aspect I find most interesting is how open source software has evolved from "something us geeks use" to being so prevalent that it goes unnoticed most of the time. Everyone knows computing has changed the world, but few people outside the IT industry recognize how much of that progress was driven by the open source movement. To really appreciate its influence requires some background, so I found a few videos to explain the key points and added a bit of elaboration. I also glossed over some nuances to keep it simple. If you're not a technical person but want to understand what's so exciting about open source or even a geek at heart seeking a simple introduction, this post is for you.

Basics of Open Source Software

Ashli, Master of Psychology!

Ashli finished her classes and received her MS in Clinical Psychology from Mercer University!

We graduated a master of clinical psychology today:

Ashli at Graduation

Graduation Day

Query Helm Chart Resources Using JSON

Deploying a Helm chart to Kubernetes just to query resources is time consuming. It's possible to directly query a Helm chart using JSON with this simple trick.

Helm piped through jq

Happy querying!

After deploying a Helm chart into Kubernetes, it's easy to query the resources using kubectl with JSONPath expressions. That's not always an option, though. I recently needed to calculate the total CPU, memory, and storage allocated for a production sized deployment that wasn't deployed yet, but I didn't have a non-production environment large enough to deploy and then query. Wouldn't it be nice if you could query Helm charts using JSON?

Paying Interest on Borrowed Time

We all live on borrowed time and the debt is too great to ever fully repay. At the very least, we could all strive to find ways to pay interest on it.

Most of my posts are technical, but I've wanted to expand on a post from Raptitude for a long time. In Your Whole Life Is Borrowed Time, David discusses how he felt after hearing about a mass shooting at a place he'd recently visited:

But when I watched videos of eye-witness accounts, including some in front of the church where I tied my shoes and the corner where I nervously loitered, it gave me a vital bit of perspective: I happen to be alive, and there's no cosmic law entitling me to that status. Being alive is just happenstance, and not one more day of it is guaranteed.

This thought instantly relieved me of any angst over that particular day's troubles: technical issues on my website, an unexpected major expense, an acute sense that I'm getting old.

Those problems remained, and they are real problems. But they immediately became only relatively important. They lost their sense of absolute importance. In fact, any personal problem I could think of now seemed to be a small, aesthetic complaint about the grand, mysterious gift of being randomly, unfairly alive that day.

AWS Summit 2018 in Atlanta

I spent a day joining 3 presentations and 2 workshops at AWS Summit 2018 in Atlanta. Read my summary and suggestions to get more out of an AWS Summit near you.

I've been working on a new product at Nokia for the past few months, and we're leveraging Amazon Web Services for rapid development. This is my first AWS project, so it's a lot to take in. That process has gone well, but there are still many services I haven't even touched on. When I heard Amazon was hosting a free AWS Summit in Atlanta, I decided to attend and see what I could learn. I had to run some errands early in the day, so I only spent about 6 1/2 hours at the event. Still, I was glad to have the opportunity to check it out. Since there are more summits scheduled this year (and presumably ongoing), I'm writing to both share my experience and to help anyone considering a future Summit. If you're attending an AWS Summit near you or on the fence about it, read on to see what to expect and get some tips around planning.

Step Functions presentation

Step Functions workshop

Introducing the Sitka Logger

Sitka is an extremely lightweight but powerful Node.js logger that's great for cloud/serverless applications.

Although it's a very small project, I'm excited to release my first open source Node.js package today. Sitka is an extremely lightweight but powerful logger that's great for modern cloud/serverless applications. It can be installed using the Sitka NPM package and the source code for Sitka is on GitHub. Yes, there were already tons of loggers to choose from. When I browsed through them, most seemed to fall into 2 categories: many felt too rigid while others were "kitchen sink" projects trying to do far too much. A logger is an essential part of every application, but it should be simple to use and stay out of your way. As a minimalist, I want something flexible without a lot of overhead. Sitka stands on its own with less than 250 lines of code and without importing any dependencies—much less half a dozen.

Flexible Logger Configuration

Quick Web Searches Using the Terminal

Create shell aliases to quickly search reference sites from a terminal including DuckDuckGo, Wikipedia, Dictionary.com, AcronymFinder, Devhints, and FreshPorts.

I listened to episode #283 of The Changelog this week and learned about Devhints, which provides "cheatsheets" on a variety of development related topics. The hosts mentioned that the site looks good in Lynx, the text-based browser, but still asked about a shell script to parse it. I thought a shell script would be overkill: why not a simple alias that searches the site in Lynx?

Giving it a try, the obstacle is that aliases always include the space between the alias and its parameters. As usual, Stack Exchange provided the right direction. With some tweaking, I was able to add this alias to ~/.bashrc:

FreeBSD Shell Scripts Added to GitHub

I use some shell script libraries to make FreeBSD system configuration easier. They're now available as freebsd-scripts on GitHub for anyone to use and improve.

I recently switched my hosting provider from Digital Ocean to Vultr to get tighter control over the configuration—a more "pure" FreeBSD installation. While updating my notes to prep for the install, I considered how many configuration steps were basic file editing: add this line under that line, uncomment this line, comment that line, etc. I love the simplicity that comes when the code is the documentation, so I decided to create a small file I/O library to make it easier to write shell scripts for system configuration. Why bother maintaining notes to describe manual changes when I could write a script to perform the changes automatically?

I'm definitely not a shell scripting guru, but I thought these libraries could be useful for others as well. I leveraged them to create scripts that perform the full setup and configuration of my host and jail including the database and web server. I've released the libraries as part of a freebsd-scripts project on GitHub along with a couple of simple scripts to back up Apache and the system configs. I also added the portsfetch script, which I use to fetch the quarterly ports tree. I'm sure I'll share more shell scripts over time, so this gives me a single project to group them under. If you use them to create something useful, tell me about it in the comments below.