Skip to main content

Blog

Count: 169

Bug Report: Disney+ App on Amazon Fire Tablet Does Not Stay Logged in

2021-06-13
My son likes to watch downloaded movies during long car rides. This bug is keeping that from happening.

28 for 28

2021-06-06
I’m 28 years old this month. It only makes sense to pair it with a list.

Reuse the Gradle Dependency Cache With Docker

2021-06-03
Ever wondered where all those JAR files go?

The Documentation Prerequisite Problem

2021-05-24
I work with documentation often. Reading it, writing it, maintaining it. You get the idea. A reoccurring problem I encounter is this: What should I assume the reader knows? And, given the answer to this, how can I write in a way so that the reader spends as little time as possible, to learn as much as possible?

JavaScript Array vs Java List: Common Actions

2021-05-02
I’ve found myself doing more Java-related work lately (project duty calls). So, with JS being as friendly as it is, thought it’d be fun to write a little comparison post.

Boredom as a Human Drive

2021-04-24
I was listening to Lex Fridman interview Cal Newport. They talk for 3 hours, and it’s interesting all the way through. They cover deep work, social media usage, history of email, and much more. The following part of their conversation really stood out to me. I had never thought of boredom in this way, as an action instinct.

Well Done, Westworld

2021-04-22
WARNING: Spoilers Ahead. I love thinking about consciousness. What is it? What are its requirements? How does it physically manifest? What are its evolutionary origins? Is it unique to us? If you like questions like these, you’ll love Westworld. It explores these topics, while sucking you into multiple story lines.

I Asked if You Saw an Issue and You Answered

2021-04-19
Every now and then the internet surprises you.

Surprising Search Results: Unintentionally Getting on the 1st Page of Google

2021-04-11
When first making this site, one of the goals was to brand myself online. (The other goal was to have a creative outlet). If you searched for my full name, I wanted to be the 1st result, or at least on the 1st page. Since that time, I’ve published a small set of articles. And funny enough, articles I thought were obscure one-offs, are now top hits…

List, Get, Set, and Unset Mac and Linux Environment Variables in Terminal

2021-04-11
Say ‘Environment Variables’ 5 times fast while staring into the Terminal.

Document Your Postgres Database With SchemaSpy and GitHub Pages

2021-04-09
SchemaSpy is a nifty tool that, using their words, let’s you document your database simply and easily. (Can confirm, it’s nice). When combined with GitHub Pages, it takes the headache out of deploying the generated SchemaSpy site.

List, Get, Set, and Unset Windows Environment Variables in Command Prompt

2021-04-07
Say ‘Environment Variables’ 5 times fast while staring into the Command Prompt.

Camellia's Famous New Orleans-Style Red Beans Recipe

2021-04-06
Sourced from the back of the Camellia’s Red Kidney Beans package.

Get the Approximate Size of a JavaScript Object in Bytes

2021-04-06
Sure, I can look at the Chrome DevTools Network tab to see the size of a resource. But what if I wanted to get the approximate size of a JS object programmatically? Well, it can be done. See the following:

Bash Reference

2021-04-04
I started to write a Bash reference table, but there’s no way I could do a better job than these resources. Hope you enjoy them as much as I do:

Rosetta Stone CLI: Write the Same Option Parser Script in Bash, Python, and NodeJS

2021-04-02
To really appreciate what a language does for you, it helps to compare it to other languages. Then you can see how (differently) common tasks are done. In this fun little exercise, we’ll write the same option parser script in multiple languages.

Read an SQL Query From a File and Run It on Startup of a Spring Boot App

2021-03-31
This is useful when you need to check the output of an SQL query on startup of a Spring Boot app. There are no template literal strings in Java 11, so for maintainability, the multi-line query is read from a file.

Git Reference

2021-03-31
A living doc.

Write Your Own Short and Long Option Parser in Bash

2021-03-19
This article has been merged into Rosetta Stone CLI: Write the Same Option Parser Script in Bash, Python, and NodeJS.

Recursively Edit Files In-Place Using NodeJS

2021-03-12
I recently converted all my blog post titles to title-case with a little NodeJS script. So, am taking the teachable bits and sharing them here.

Crocker's Rules

2021-03-09
I stumbled upon Crocker’s Rules today. It’s funny, because I have this type of relationship with a few folks at work. It’s sort of an unspoken rule between us, and it’s nice.

Build a Search Bar for Your Hugo Blog With a JSON Index and Some Vanilla JS

2021-03-06
My blog has become a personal knowledge base of sorts. As it’s grown, doing the usual Command + F for browser-search doesn’t always cut it. I sometimes need to search for keywords within a blog post, yet only titles are shown on the blog list page. So, that’s my problem, but how to fix it?

Create a Text File in Memory Then Download It on Button Click With Vanilla JS

2021-03-04
This solution is simple. It’s the coming up with this solution that took time. Alas, what’s new.

End-to-End (e2e) Testing Rules

2021-02-23
e2e testing projects have gained a sad reputation over the years. They’re known to be slow, flaky, and time-consuming. Yet, it doesn’t have to be this way. Can you imagine e2e tests that are fast, reliable, and clean? It’s possible. And by following this small set of rules, you can set yourself up for success.

Check Flyway Migration Filename Prefix for Uniqueness at Build Time

2021-02-19
When using Flyway, each migration filename prefix must be unique. If they’re not unique, then Flyway will fail at run-time. This was not good enough (for me), because it meant that duplicate prefixes could be merged, and would not be discovered until the app was deployed.

Simon Sinek on Performance vs Trust

2021-02-14
There are more factors that go into choosing a Navy Seal than just performance vs trust. But I get what Simon is saying, and it’s true for me personally: I would rather work with a high trust & medium performance leader, than a medium trust & high performance leader.

Don't Have Flyway Teams? Roll Your Own Version of Output Query Results

2021-02-11
Flyway is a popular database migration tool. They offer two versions, a Free edition, and a Teams edition. I was using the Free edition on a project. When creating the migration files, I did a pg_dump of an existing database. This worked out fine and dandy, except for one thing…

A Shell Script Wrapper for pg_dump

2021-02-09
pg_dump is a sweet tool to extract a database to a file (tables, functions, triggers… I mean everything). It has many CLI options, and I’m documenting the ones that were most useful to me here.

Use Extra Properties to Consolidate Dependency Versions in Your build.gradle File

2021-01-24
When defining dependency versions in your build.gradle file, if dependencies share the same version, you have to repeat it each time.

Naming Environment Variables

2021-01-24
I often go back-and-forth on what to name env vars. Should I put an underscore here? Should I combine these words into one?

Fix the White Flash on Page Load When Using a Dark Theme on a Static Site

2021-01-17
I maintain a few Hugo themes, one of them named Cupper. Recently a GitHub issue was opened that described a white flash on page load when the dark theme was active. After some investigation, the bug was indeed real. A boy was it a tricky one.

2021-01-16 Assorted Links

2021-01-16
Links, they’re assorted.

Foil Chicken Recipe

2021-01-15
It’s hard to mess up.

Set Environment Variables in Your Bash Shell From a .env File (Version 2)

2021-01-14
This post is version 2 of Set Environment Variables in Your Bash Shell From a Env File. The advantage is it supports quoted values that contain spaces.

Those People Who Answer Your Question as a Gift

2021-01-10
The following is an excerpt from The Stack Overflow Podcast where Joel Spolsky talks about Stack Overflow as a Gift Economy (among other things).

Playing With Background Images

2020-12-22
Playing around with CSS background image and filter properties.

Use a CentOS Docker Image to Build and Deploy a Hugo (Modules) Site to GitLab Pages

2020-12-22
Am wrapping up a project for a client that needed a static site. They requested that it be built with Hugo and deployed to GitLab pages. The theme they wanted to base it off uses Hugo Modules, which in turn requires a Golang installation.

Mkdocs Template: The No-Excuses Template to Document Your Project

2020-12-12
MkDocs may be my favorite tool to quickly document a project. Combine it with Material for MkDocs and GitHub Pages, and you’ve got yourself a very nice-looking theme and place to publish your docs.

Bash Shell Script Template

2020-12-08
Bash is one of my favorite scripting languages. I often find myself doing a task many times, only to turn it into a shell script for easy usage.

Show and Hide Lines of Text via CSS Line Clamping

2020-12-03
I had to implement a clamp-and-expand feature recently. If you do an internet search for how to do this, the results are sparse, and there seems to be no standard way.

Snippets From the Book Clean Code

2020-12-01
The following are some of my favorite snippets from the book Clean Code: A Handbook of Agile Software Craftsmanship.

An Unchronological Photo Album

2020-11-30
My wife’s Christmas present is a photo album of our son, a timeline ranging from newborn until now (he’ll be 3 soon). I was tempted to organize them in chronological order, but that’d no fun. Instead, I grouped ‘em by theme:

Crazy Johnnie's Chicken and Sausage Gumbo Recipe

2020-11-16
This recipe is an amalgamation of a few things: My dad had made some Crazy Johnnie’s BBQ shrimp for a family event. Once I peeled the leftovers, I couldn’t bring myself to throw away the juice because it smelled so good. My wife suggested making a chicken and sausage gumbo and adding the juice in. I had never made gumbo before, but my sister-in-law makes a good one. Between her recipe, and Cajun Ninja’s recipe, this one was born.

Attention Is My Most Valuable Asset for Productivity as a Software Developer

2020-11-08
My high-level workflow looks something like this: identify the problem to solve; think on the problem and let ideas percolate; research, discuss, and experiment with these ideas; implement and test the solution; deliver and maintain the solution.

Deploy a Site to GitHub Pages

2020-10-11
GitHub has a cool feature called GitHub Pages. It’s basically free web hosting for your repo. Your site is served from branch gh-pages. And the url becomes https://<USER_NAME>.github.io/<REPO_NAME>

Rebuild Your Docker Compose Stack

2020-10-06
When using volumes with Docker Compose, especially with NodeJS projects, sometimes vague errors show up, like file permission errors for reading or writing a file. When this happens, it can be helpful to rebuild your Docker Compose stack from scratch to resolve these errors.

How to Add an Apple Touch Icon to a Squarespace Site

2020-10-04
Normally, on say a static site, this would be a matter of uploading files to a server then calling it a day. But, Squarespace makes you jump through hoops. So, documenting this here in case I or someone else has to do this again.

Add a Git Commit Hook to Run Prettier on Only Staged Files in a NodeJS Project

2020-09-16
Prettier is a popular code formatter, and I especially like it for JS projects. You can add a script to run it with something like npm run prettier, but wouldn’t it be nice if it would run automatically every time you did a git commit? On top of that, say your project is huge with thousands of files, wouldn’t it be nice if prettier only ran on staged (changed) files?

Setup and Run SonarQube on Mac

2020-08-31
It can be useful to run sonar locally. This doc explains how. Sonar has 2 main parts: sonarqube, which is a server that displays scan results (among other things), and sonar-scanner, which does the actual scanning.

Prevent the Display, System, and Disk From Sleeping on Mac

2020-08-31
When you step away from your Mac, it can be useful to prevent it from sleeping. Say you want to grab some coffee, but not deal with unlocking your screen and such when you get back. It’s as easy as running a quick command.

NightwatchJS Template

2020-08-28
The following are README excerpts from a repo I’ve been working on. If you do end-to-end testing on your project, check it out, it’s a good resource. And, I’m quite happy with it.

Wait for Element Text to Equal a Specific Value in NightwatchJS

2020-08-01
It can be useful to wait for an element’s text to equal a specific value before doing the rest of your test steps. This is possible in NightwatchJS, you just have to dig in the docs a little. Note: Instead of text, you can also wait for an element’s attribute to equal something. And instead of equal, you can do contain, or use not to check the inverse. Many other variants are available in the Expect API docs.

Set Environment Variables in Your Bash Shell From a .env File

2020-07-28
I experimented with many ways of doing this, but my favorite solution was from this stackoverflow answer. It keeps the .env file syntax clean so that it can be used across projects. Here’s a minimal, reproducible example.

There Is a Richness and Complexity That Is Completely Inexhaustible Right at Hand

2020-07-20
The following is an excerpt from a Jordan Peterson lecture.

Jocko Motivation: Good

2020-07-20
My brother-in-law shared this Jocko motivation video with me the other day. Warning: be careful listening to it, it’ll get you all jacked up. Transcription below.

Make Pretty JSON Output in NodeJS

2020-07-16
By default, the JSON.stringify function outputs minified JSON, see MDN docs. When logging or writing JSON, I usually like to make it look pretty. This can be done by tweaking the function arguments. The first argument is the data to convert. The second (optional) argument is a replacer function, we’ll leave this null. The third (optional) argument is the space to use when formatting the JSON, we’ll use 2 spaces.

Wait for an Element to Be Enabled in NightwatchJS

2020-07-16
In NightwatchJS, you can wait for an element to be present, or to be visible. But there is no built-in command to wait for an element to be enabled. Luckily, this can be done by using the :enabled CSS pseudo-class, see MDN docs.

Install Python on Windows Without Admin Access

2020-07-13
Sometimes you need to install developer tools on a Windows machine, but you don’t have Admin access. How to get around this, you say? Well, instead of running an installer, you download the binaries you need then add them to your PATH.

Install NodeJS on Windows Without Admin Access

2020-07-13
Sometimes you need to install developer tools on a Windows machine, but you don’t have Admin access. How to get around this, you say? Well, instead of running an installer, you download the binaries you need then add them to your PATH.

Generate a Random String in Hugo

2020-06-17
I recently fixed an issue where I needed to generate a random string. The string had to be random, even if given the same input seed.

Find All Tables That Do Not Have a Given Column in Postgres

2020-06-15
If you have hundreds of tables, it can be a pain to search each individual one to check if it has a given column. This query left joins all tables for a given schema, <some_schema>, against itself, then shows tables that do not have a given column, <some_column>.

Add Search Functionality to Your Blog Listing Page

2020-06-14
WARNING: THIS POST IS DEPRECATED. Instead, see Build a Search Bar for Your Hugo Blog With a JSON Index and Some Vanilla JS

Strawberry Ice Cream Recipe

2020-05-26
Don’t take it too seriously. Experiment, experiment, experiment.

Grant Current and Future Objects to a User (Role) in Postgres

2020-05-21
Ran into an issue at work with one of our flyway scripts. The script was somewhere in the middle of the migration order, so it wasn’t the first or the last script to run. This was an issue since we needed to grant read-only access to a some_user user for both current and future tables that were created. After a bit of tinkering, I came to the below solution.

Cajun Ninja's Pastalaya Recipe

2020-04-28
This is not my recipe, it’s Cajun Ninja’s. Transcribing and tweaking it for archival purposes. It’s a keeper.

Cold Pasta Salad Recipe

2020-04-11
We got this recipe from my parents. They got it from my dad’s mom, Mawmaw Betty. I can easily eat four helpings of this stuff in one sitting.

Why Is My Gradle Build in Docker So Slow?

2020-02-26
Why is my gradle build in docker so slow? I’ve asked myself this question often recently. Building outside of docker is quick, so what gives?

By Value vs by Reference in JavaScript

2020-02-25
Was having a fun debate with my cubicle mate the other day on what happens when you declare a variable with const and then assign its value to something else. I said that a plain assignment would copy it by reference, not by value. My words only go so far, so had to whip up a quick example. Maybe you knew this already about JavaScript, but if not, TYL (today you learned?).

Creamy Chicken Taco Soup Recipe

2020-02-22
Satisfy your inner Chihuahua.

Convert a PDF File to PNG or JPG With Imagemagick on Mac

2020-02-10
I needed to convert some large PDF files into images for my wife. All of the free online converters had a file size limit of around 25 MB… but the files I was working with were a few hundred MB. Once again, Imagemagick comes to the rescue. Here’s how to do it:

Massage a JSON File With a NodeJS Script

2020-01-27
At work, some of our projects keep test data in large JSON files. These files are usually structured as an array of objects, which can be thousands of lines long. When I need to make changes, manually find-and-replacing can only get me so far. I can get cleverer with vscode’s regex mode, but still, I am limited.

Install Docker and Docker Compose on Mac

2019-10-28
You used to be required to create an account. Things are better these days.

Someone Can Explain the Theory of Bike Riding Badly, Yet Still Ride a Bike Well

2019-10-21
In an excerpt from his book Antifragile, Nassim Nicholas Taleb lays out a conversation between Fat Tony and Socrates. My gut reaction when reading this was to defend Socrates. But after a few reads this gem soaked in: a person can know a thing well, and still explain it badly in words.

Install Ruby Version Manager (RVM) on Mac

2019-10-19
I agree, it shouldn’t be this hard. Alas.

Install Yarn on Mac

2019-10-19
Don’t do it. Use NPM. Well, you were warned.

Install NodeJS and NPM on Mac

2019-10-19
Who needs nvm.

Change Terminal Prompt on Mac

2019-10-19
Your Terminal prompt is controlled via the PS1 Bash environment variable . It’s initially defined in /etc/bashrc, and its default value is:

You Cannot Selectively Numb Emotions

2019-10-12
Was listening the Dax Shepard’s interview with Brené Brown after one of my friends recommended it to me. They cover many topics – addiction, vulnerability, political polarization – to name a few. What really caught my attention, though, was when Brené talked about numbing and its relationship to emotions. That whole concept hits home for me and the snippet was too good not to transcribe. So, enjoy.

Install Gradle on Mac

2019-10-11
Some people say it’s groovy.

Install Java on Mac

2019-10-11
Good old Java, let me install you.

Show Hidden Files in Mac Finder by Default

2019-10-11
Show Finder the light.

Install Postgres and psql on Mac

2019-10-11
For your local database needs.

Log Docker Stats to a File

2019-10-01
Recently I needed to log the output of docker stats for a few of my containers in order to compare. The following snippet will log container stats to a file (stats.txt), and to stdout, every 1 second. Tweak it to your liking.

Install SQL*Plus on Linux

2019-09-28
When some random guy’s blog ranks higher than the Oracle docs, what does that tell you?

Open a New Google Chrome Tab (Or Window) via Command Line on Mac

2019-09-16
Ever been in your terminal and wanted to open a new chrome tab (or window), without actually switching to chrome? Well, it’s possible. Checkout these examples:

Cajun Ninja's Smothered Pork Chops and Onion Gravy Recipe

2019-09-15
This is not my recipe. It’s Cajun Ninja’s. Only posting it here so that I don’t have to read a youtube comment for it :) We’ve made this multiple times. It’s legit.

Combine Images Using ImageMagick

2019-09-09
I often combine screenshots for documentation purposes. ImageMagick is great for this. Given a dir of images:

Kylynn's Chicken Salad Recipe

2019-09-08
Perfect for beach snacking.

Aristotle on Marriage and Trust as the Foundation of Civilization

2019-09-01
I was listening to the AoM podcast #515: Aristotle’s Wisdom on Living the Good Life, and heard a bit that’s stuck with me all this week. It’s too good not to write down.

Convert HEIC Images to JPG Part 2: Mac Automator

2019-09-01
This post builds on part 1. In that post, I described the command-line steps necessary to convert hundreds of my wife’s pictures from .heic to .jpg. Well, turns out this isn’t a one-time-thing. She works in real estate, and lately has been needing to do the task more often. So I added a simple GUI using Mac Automator. A rough version of the steps follow:

Change Mac Default Screenshot Save Location

2019-08-16
Sometimes the Desktop isn’t enough.

Search All Database Table Columns

2019-08-16
Ever wanted to search an entire database for a column by name? Well, put your detective hat on, ‘cause it’s possible.

JB's Fried Fish Recipe

2019-07-05
Growing up, my dad (JB) was, and still is an avid fisherman. He prepared fish for us often, and taught my brother and I how to fry ‘em. This recipe works for all kinds of fish: bass, bream, sacalait, trout, and catfish, just to name a few. I hope you enjoy it as much as our family has.

Passing Input to a Bash Function via Arguments or stdin

2019-06-29
I have a collection of Bash functions that I often use. For some of them, I needed to ability to read input from all of the following:

From SQL to Java String and Back

2019-06-21
Manually converting SQL to a Java string, or vice versa, isn’t bad if it’s only a few lines. But when your query is hundreds of lines, that’s no fun. So I wrote Bash scripts to do the heavy lifting. Each script is below, followed by an example usage.

Encourage Your Children

2019-06-18
If it’s not obvious from the other content on my site, I’m a huge Jordan Peterson fan. He has this way of weaving together multiple disciplines – mythology, psychology, and biology, to name a few – into a fascinating message (sermon?), that pulls at the deepest parts of you. He recently released a short video named encourage your children. I liked it so much, I’ve transcribed it below.

Recursively Rename File Extensions With a Bash Script

2019-06-12
I was recently helping a Hugo user rename all their content files from .md to .mmark. Posting it here since it’s useful for more than just Hugo projects.

Connect to a Postgres Database and Run a Query From a Bash Script

2019-06-07
Get Postgres and Bash to play nice.

Connect to an Oracle Database and Run a Query From a Bash Script

2019-06-07
Get Oracle and Bash to play nice.

Install SQL*Plus on a Mac

2019-06-07
When some random guy’s blog ranks higher than the Oracle docs, what does that tell you?

My Collection of Useful Bash Functions

2019-05-30
This article has been removed. Bash functions now live in my dotfiles.

Bash Date Time Format Specifiers

2019-05-21
Given the following bash date, here’s what each specifier will do.

Convert Your Plain Old HTML Site to Hugo

2019-05-19
Once you have a grasp of HTML and CSS, we all know how easy it is to throw together a simple site: create your homepage, copy that HTML to other pages, then change the content. This process isn’t too bad if your site only has a few pages. But things get out of hand quickly once the number of pages grow.

Kylynn's Oatmeal Chocolate Chip Cookies Recipe

2019-05-14
I dare you to eat only one.

Eerie Art

2019-05-09
I’ve always been attracted to eerie art. Hard to say what it is exactly that draws me. The strangeness and darkness of it are just appealing. The following are some of my favorites pieces. Hope you enjoy them as much as I have.

Routines Are Boring, Right?

2019-04-24
Growing up, I thought people with routines were silly. Why would you script so much of your life away? Where is the fun if you always know what you’re gonna do? Who doesn’t love a little chaos, right?

Preview Your Site From Any Device on Your Network With These Hugo Server Options

2019-04-23
When developing your hugo site from your main computer, have you ever wished you could preview it from your phone to see how it looks on a mobile device? Well, you’re in luck: it’s possible, and can be done with any device connected to your network. Here’s the command.

Mawmaw Betty's Strawberry Pie Recipe

2019-04-21
Surprise yourself.

Add Your Account as a Sudoer on Mac

2019-04-17
With great power comes great responsibility.

Check if a Program Exists From Your Bash Script

2019-04-12
Lately I’ve had the Bash bug… and I’m continually impressed at what can be accomplished with this tool. Just the other day, I needed to check for the existence of some programs before doing the rest of my scripting work.

Create Header Links: Hugo vs JavaScript

2019-04-11
Update: As of Hugo v0.62.0 this can now be done with Markdown Render Hooks. Thanks to @ulab for the heads up. GitHub adds header links to markdown documents by default. I like the way this looks and how it makes sharing link fragments easier, so I added the feature to my lil boot theme.

The Microsoft Console Colortool

2019-03-26
Today I stumbled upon Microsoft’s Console ColorTool. I’ve long played around with the color scheme of my Windows Console to make things more readable and improve the aesthetic (with not much luck). This awesome tool let’s me make color changes easily, and the changes show up in Command Prompt, PowerShell, and Windows Subsystem for Linux Console. Nice.

The Foyer Phone Method

2019-03-22
If you’ve never read Cal Newport’s blog, you’re missing out – his content is just plain meaningful to my life (and likely yours). The following excerpt is from his blog post on Digital Minimalism for Parents. I do something similar to the “foyer phone method”, but instead of leaving it in the foyer, I leave it in the car until my wife and I put our son down for bed. It’s crazy how much mental energy is freed up when you’re not worried about checking your phone. It makes those little conversations and moments all the more enjoyable.

Bash Function to Delete All Local Git Branches Except for Those You Want to Keep

2019-03-22
This article has been removed. Bash functions now live in my dotfiles.

Bash Utility Functions

2019-03-18
This article has been removed. Bash functions now live in my dotfiles.

On Being Comfortable

2019-03-11
I’m INFJ on the Myers Briggs Type Indicator, and a five on the Enneagram. So if your personality is similar to mine, perhaps the below is useful to you as well.

Use Hugo Templating in Your External CSS

2019-02-18
Hugo Pipes allows resource creation from an asset file that contains templating. As an example, let’s say you want to make your site’s background color and text color configurable. In your config.toml file, you would have the below:

Pretty Print Github Markdown

2019-02-11
If you want to pretty print your markdown docs in GitHub (GH), and your repo lives on the official github.com, then you can use gitprint. But at work our GH is hosted internally, so this gitprint service does not work.

Bret Weinstein on Metaphorical Truth

2019-02-08
I recently stumbled upon Dax Shepard’s Armchair Expert podcast. His interview with Bret Weinstein was very interesting and fun. Just before the 2 hour mark, they get into the topic of metaphorical truth. Although I don’t fully agree with everything said, it really resonated with me. The following is my lightly paraphrased version of the conversation.

Just Enough tmux to Do What I Need

2019-02-07
As mentioned in Export timed query results from SQL*Plus, I have to SSH into an ubuntu box in order to run queries. Sometimes these queries take a while, so if my SSH connection times out, I’m out of luck.

Download a File Over HTTPS Using Apache Commons' FileUtils

2019-01-30
In some of our selenium tests, we download a PDF file generated by our app and then inspect it. This works fine locally since the app URL is http. But in our CI environment, everything is over https. So we had to do some tweaking before calling FileUtils.copyURLToFile. Below is a stripped down version of our solution:

How to Find a Used TCP Port and Kill the Associated Process on Your Mac

2019-01-30
Sometimes the port you need is already used by another process. To find the offending process:

Parse a URL in Hugo

2019-01-25
Need to parse a URL in your Hugo templates? Thanks to the urls.Parse function, you don’t have to do a bunch of string manipulation. Here’s a quick example.

Syntax Highlighting in Hugo With Chroma

2019-01-21
Hugo has built-in syntax highlighting, provided by Chroma. To use it, you just need 2 lines in your config.toml file:

Override a Hugo Theme

2019-01-20
We’ve all been there. You’re browsing through the Hugo themes and find one that you really like. It meets all your criteria, except for that one small thing. So, what are your options?

Export Timed Query Results From SQL*Plus

2019-01-15
At work, we have to SSH into an ubuntu box in order to run queries. Since this box has no GUI, all work must be done through command line and SQL*Plus. Sadly, pasting multi-line queries into SQL*Plus is a no-go. And copying query results, if they’re more than a few dozen lines, isn’t much better. So, after trial and error, here’s my solution:

Make a Hugo Blog From Scratch

2019-01-13
In my opinion, Hugo’s current quick start is ample. It does just what the name says, gets you started you quickly. Still, there have many requests on the forums for a tutorial that dives deeper than the quick start, and gets into some templating basics. The thing you’re reading is my go at that. Starting from scratch, we’ll build a Hugo blog.

One Constructive Criticism, One Good Thing

2019-01-03
Once in a blue moon, we play this game. It usually goes by the name “one bad thing, one good thing”. The “bad” thing is more of a constructive criticism. The idea is to give the other person something they can realistically work on. Each person gets a chance in the hot-seat, while the others take turns offering words.

Style a Markdown Table With Bootstrap Classes in Hugo

2018-12-12
Inspired by this discussion, I wanted the ability to style a markdown table with Bootstrap table classes. In the past, I’ve accomplished this by defining the table in a data file, then building it with a shortcode.

Coming From Java (Or a C-Like Language) to Hugo's Go Templates

2018-12-10
If you have a basic understanding of Java, or any other C-like language, then this post will ease you into Hugo’s Go Templates syntax.

Convert HEIC Images to JPG

2018-12-06
My wife needed to upload a couple hundred pictures, from her Mac, to an online service that makes photo albums. The service didn’t accept images with the .heic extension, so she needed to convert them to .jpg. This would take many hours to do one-by-one, so thankfully ImageMagick supports conversion of HEIC images. Here’s how to do it.

Hit localhost on macOS From VirtualBox Windows 7 VM

2018-12-03
At work, everyone on my team has Macs, but the users of one of our apps use Internet Explorer 11 (IE). We obviously need to test in IE, but how? This is where a VirtualBox Win7 VM comes in handy. Our app has a React front-end, so local development/testing is done on http://localhost:3000. But how do we hit this URL from the Win7 VM? I’ll show you, but first let’s setup the VM.

Generate Lorem Ipsum With a Hugo Shortcode

2018-12-02
Inspired by this discussion, I thought it’d be useful to generate Lorem Ipsum with a Hugo shortcode.

File Variables in Hugo

2018-11-27
Hugo’s .File variables (see the docs) are useful for getting filesystem data on your content files.

Create an HTML Table From a TOML Data File in Hugo

2018-11-12
This post was inspired by a recent Hugo discussion. In a nutshell: instead of writing the table in markdown, the user wanted to build the table from a TOML data file. Below is one way to solve this.

Resources for Learning to Code

2018-11-02
I’m sometimes asked about resources I would recommend for learning how to code. That phrase can mean a lot of things, so pulling from my own experience, here’s how I’d narrow it down. Please note that these are my personal recommendations, and are only a very small slice of the “learning to code” pie.

The os.Stat Function in Hugo

2018-10-29
The os.Stat function in Hugo (see the docs) is useful for getting info on a file.

Use Snap to Install the Hugo Edge Version on Fedora and Ubuntu

2018-10-26
If you are using the Fedora or Ubuntu Linux distributions – I’m currently on Fedora 28 – and would like to help test the latest development version of Hugo, or if you just want to be on the bleeding-edge of things, this post is for you.

Run Hugo Server With Custom Config Options

2018-10-25
The idea originally came from this hugo discussion forum post. There was a commit (it has since been reverted) that removed the disableFastRender flag from the config.toml options. So instead of running hugo server and it picking up the flag from your config file, you’d now have to run hugo server --disableFastRender.

Speed Up a Fedora Linux VM on VirtualBox

2018-10-24
Does your freshly created VirtualBox Fedora Linux VM feel slow? Mine sure did. After much trial and error over many days, the following steps worked for me to speed things up.

Use Visual Studio Code as Your Default Text Editor for Git

2018-10-24
Single-line commit messages in git are easy from the command line: git commit -m "<SOME_MESSAGE>" But what about multi-line commit messages?

Script to Install Latest Hugo Release on Linux and Mac

2018-10-19
Running this script will install the latest (non-extended) hugo release. It was originally written for Linux. To make it work for Mac, find/replace occurrences of Linux with macOS.

Quotes on Endurance

2018-10-13
Nietzsche is one hell of a wordsmith.

Copy Command Line Output to the Clipboard on Mac and Windows

2018-10-12
In each example below, the contents of a file are copied to the clipboard.

Script to Add a Page-Level Variable to Content Front Matter in Hugo

2018-10-10
This was originally a question posed on the hugo discussion forums. The user wanted to loop through all her content files and add a weight page-level variable to the front matter. The value of weight needed to be the first 2 characters of the content filename, since her content was named like 01_content.md, 02_content.md, etc.

Barbell Training to Get Me Through the Day

2018-10-08
For some, barbell training gives them loads of energy for their day. For me, it does something just as good: it gets me through my day.

Selfies in the Road

2018-10-07
My wife’s family and I took a trip to Canada the beginning of October. We drove through national parks in Jasper and Banff and had the pleasure of seeing their beautiful landscapes. Driving through vast icefields while the Rocky Mountains tower over you has a way of making you feel small.

Mac (Bash) to Windows (Command Prompt) Mappings

2018-09-22
Until late 2018, I’d been a Windows guy most of my life. Then a new project at work required everyone to get Macs, so it was time to learn. This post is basically a “note to self” for command syntax when switching back-n-forth.

QuickBooks Windows Desktop Development Docs

2018-09-21
Created a GitHub repo with docs and code examples for developing against QuickBooks (QB) Desktop on Windows. It pulls from my experience developing Windows Forms apps that query from and import data to QB.

Just Enough vi to Open a File, Edit It, and Quit

2018-09-19
vi is something I use rarely, usually when I don’t have access to a GUI text editor. For those times, here’s just enough to do what I need:

Download Chromedriver Binary and Add to Your PATH for Automated Functional Testing

2018-09-19
Many automated functional testing projects these days rely on chromedriver as the main driver. Below are steps for Mac and Windows to download it, add it to your PATH, and verify setup. You can obviously place the chromedriver binary in any directory you like, I just used Mac ${HOME}/bin and Windows C:\bin for this example.

Make a Beep Sound When Console Outputs Certain Text

2018-09-18
Originally this was a question posed on the hugo discussion forums. When running hugo server, the user wanted to be notified with a beep of any error messages that were output by the console. This isn’t a use case for me personally but I thought it was a fun problem to solve.

Maui Trip

2018-09-17
My wife and I went to Maui in March of 2017 and I’ve been meaning to write about it ever since. The landscapes there are just gorgeous. If you ever get a chance to go, here are some of our favorite things to do.

Personal Docs on the Find Command

2018-09-17
find command options that I care about.

A Minimal Hugo Blog Layout

2018-09-16
I created a minimal hugo blog layout for general use. Although it uses only a subset of the features that hugo offers, it’s a good “starting point”. It has no CSS styling – read the hugo docs and add your own styling to make this look how you want.

Mawmaw Betty's Milky Way Ice Cream Recipe

2018-09-14
This recipe was given to me by my Mawmaw Betty. Her, my Pawpaw Allen, and my dad made this growing up. We’ve experimented with different candy bars over the years. My wife likes it with Butterfingers or Reese’s. But I think Milky Ways still taste best. Eating a cup of this ice cream after eating spicy boiled seafood always hits the spot.

Autodial a Phone Extension on iOS

2018-09-14
For lines that you often call into, e.g. Daily Standup, it can be annoying to type the extension each time. Fortunately, there is a way to automate this.

To Take a Trip or to Increase the Baseline Quality of Your Life

2018-09-12
The irony of this post is that I am writing it while on a trip. Yet I think it’s one of those ideas that only strikes you once you’ve walked the grass on both sides of the fence.

Use Grep to Recursively Search for Text for a Given File Extension

2018-08-22
Ran into a scenario at work where I needed to search for a piece of text, but only in files with a certain extension, and in all subdirectories (and their subdirectories, and so on). I knew of grep, but had only used it to search for text in a single file. Well, turns out it can do way more than that.

Quotes on Resistance

2018-08-20
My boi Lewis laying it down.

Optimize Images and Reduce Page Load Times With ImageMagick

2018-08-19
Update: I now use Hugo’s Image Processing feature for image optimization.

Townes' 6 (Ish) Month Photos

2018-08-16
Townes (or Townes-man as we like to call him) had his 6 month pics recently. Well he was 7 months at the time, but you know how it goes. Millie makes an appearance too.

Keeping My iPhone 6 Alive Without Replacing the Battery

2018-08-14
If you have an older generation iPhone, you’ve likely felt the effects of a lithium-ion battery nearing the end of its lifespan. If you’ve update to iOS 11.3 or higher, apple enables “performance management”.

Default Parameter Values in Java

2018-08-10
I’m used to C#, so if I want a parameter to have a default value, it can be done like this.

MacBook Tweaks

2018-08-06
Got a new MacBook for work about two weeks ago (macOS High Sierra, 15 inch screen, 16 GB memory). I’ve been a Windows guy most of my life, so it’s been a fun switch. As I was settling in, here are a few tweaks I made so things would feel more homey.

Bootstrap 4 With Bootstrap 3 Code Styles

2018-03-30
I recently moved this site to Bootstrap 4. Some of my favorite things about v4: margin-top is avoided, margin-bottom uses rem instead of px, a native font stack is used, and base font-size is 16px (a good thing for mobile readers, and accessibility). I feel the typography in v4 is better spaced and the text can “breathe”.

Things I Like

2018-03-21
A list of things that I like, in no particular order. This is a living document.

Aliases in Windows Command Prompt

2018-03-13
Unix-like operating systems make it easy to add command aliases, e.g. adding a line to .bashrc, .bash_profile, or .bash_aliases. But what about Windows command prompt users?

Simple Pleasures

2018-03-09
I am beginning to learn that it is the sweet, simple things of life which are the real ones after all. — Laura Ingalls After watching why small pleasures are a big deal, I started a list of my own. With a bit of passing around to family and friends, here’s what we ended up with. The original list consisted of just a few. As more come to mind, I add them here.