Paying Interest on Borrowed Time

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

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,, 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.

Enable Spell Check in Pidgin on FreeBSD

Easily enable Pidgin's spell-check feature on FreeBSD by adding a local dictionary.

Pidgin's spell-check feature doesn't work by default on FreeBSD, so I finally searched for a solution and found instructions to manually install spell-check support on Windows. That was useful enough information to get it working.

Simply download OpenOffice's U.S. English dictionary and save it to /tmp (or another convenient location). Then extract the required files as shown below:

Using Quarterly Ports on FreeBSD

FreeBSD 10.2 and higher use mismatched repos for packages and ports. This shell script simplifies updating your ports tree from the current quarterly branch.

Beginning with FreeBSD 10.2, binary packages installed using pkg are built from a quarterly SVN branch that only receives security and build updates once it's created. The goal is to provide a more stable software repository than the ports tree, which is constantly being updated and may even include broken ports at times. However, portsnap uses the latest/HEAD branch for the ports tree. Since mixing quarterly packages with current ports could lead to trouble, you have to choose one of these paths:

  1. Switch pkg to install packages from the latest/HEAD branch.
  2. Use SVN instead of portsnap to fetch and update your local ports tree.

Migrating from Feedly to Nextcloud News

It's easy to migrate RSS subscriptions from Feedly to Nextcloud News, but saved articles are more complicated. Here's a bit of JavaScript to simplify the task.

I'll admit to using a few cloud services in moderation, but I tend to choose privacy over storing my life on other people's computers. While I was on vacation at the end of 2016, I set up a Nextcloud server to replace my privately hosted and very outdated solutions for syncing contacts (Kolab over IMAP) and calendars (ICS over WebDAV). After setting it up, I was surprised to find a News app for Nextcloud that adds support for RSS/Atom feed subscriptions. Of course, there are also apps that provide access to those subscriptions from mobile devices. Stop allowing Feedly to monitor my online reading habits? That sounded like icing on the cake to me.

Nextcloud logo

Nextcloud: A safe home for all your data

Cruise to Jamaica, Grand Cayman, and Cozumel

For our 2016 vacation, we took a cruise to Jamaica, Grand Cayman, and Cozumel aboard the Carnival Splendor. It wasn't our favorite cruise, but we still had fun.

My family loves to travel and see new places. For vacation this year, we took a cruise to Jamaica, Grand Cayman, and Cozumel aboard the Carnival Splendor. While the ship wasn't great, it still got us to the places we wanted to see. Without finding yourself in a natural disaster, it would be tough to have a "bad vacation" in the Caribbean.

Carnival Splendor

How to Create Keyboard Shortcuts for PHP

I finally grew tired of typing the awkward PHP object operator. Learn how to create keyboard shortcuts for KDE and use my shortcuts for PHP as a starting point.

My preferred server-side language is PHP. It's powerful and flexible, but it's certainly not perfect. One of my pet peeves is the object operator (->). I've programmed in C++, so I can appreciate its heritage. It's simply not needed in this case, so it feels like overkill to have to repeatedly type such an awkward key combination. Why should I move my hand to the top row for one key and hold shift for another when a single dot would be perfect for the task? Is it solely a byproduct of the poor decision to use the dot for string concatenation? I finally got fed up enough to look for a solution.

As with many desktop environments, KDE allows you to configure keyboard shortcuts that trigger a specific set of keystrokes. You can create your own in System Settings -> Shortcuts and Gestures -> Custom Shortcuts. From the Edit menu, select New -> Global Shortcut -> Send Keyboard Input. On the Trigger tab, click the button and provide the shortcut you want to use. Then select the Action tab and enter the keystrokes you want the shortcut to send. Type out the words for meta keys like Shift and Alt, use + to indicate keys that should be pressed simultaneously, and separate the keys using a colon. For example, -:Shift+. will output - and > (the object operator). You can also use directional words (e.g., Left and Right) for the arrow keys to position the cursor within the output.