Ben's Corner

Career Engineering By Tracking Work Faster With Command Line Jira 2021-01-30 | 761 words

Thank you Matt Doar and Josiah Bradley for reviewing this post.

SQL Schemas from the Terminal with SchemaSpy 2020-12-20 | 333 words

I’m building an app backed by MySQL and I need to easily see what its columns are and how they relate to each other so I can write good SQL queries against it. Fortunately, the database geniuses invented the schema diagram for this. I found three or four tools that…

Creating an Azure Key Vault Certificate with Go 2020-11-29 | 1353 words

So… I need to make a TLS certificate in an Azure Key Vault with Go. I thought this would be easy - just authenticate, then make the certificate. However, the Go SDK seems mostly auto-generated and is truly pitifully documented. Here’s how I ended up creating my certificate.

My Workstation 2020-11-15 | 550 words

Sad Work-from-home Meals 2020-11-01 | 94 words

When the office closed during the pandemic, my work stopped feeding me daily and I, like so many Bay Area tech workers, was forced to cook for myself.

JSON JQ Snippets 2020-05-02 | 123 words

Here are some snippets for use with jq and some other random JSON tips.

Long Shell Oneliners Without the Pain 2020-04-14 | 477 words

I love working in my terminal. It has a ton of useful programs that you can stitch together to do useful things. However, sometimes these commands can get long. For example, here’s a command I use to launch a Jupyter Notebook in docker:

Useful Checklists 2019-08-25 | 461 words

These are fairly small lists that I want to read every once in a while.

Software Engineering Ideas That Influence Me 2019-08-11 | 1034 words

I watch a lot of conference talks on YouTube and I read a lot of software engineering articles. Some of that media has really helped me become a better engineer. As a relative newcomer to engineering, I know my style will develop further and my current judgment of “best practice”…

My Favorite things in Arkansas 2019-08-08 | 147 words

Some of my favorite things in Arkansas:

Bible Verses About Charity 2019-08-08 | 2861 words

These are some of my favorite verses about love. Click the header to go to read the entire book chapter and the text to expand the verse selection inline. All verses are in the King James Version (KJV) of the Bible.

Learn Python 2019-07-21 | 734 words

Python has exploded in popularity recently. There are great reasons for this. It’s famously one of the easiest programming languages to learn and it has a bunch of great libraries for things like data analysis and visualization, making websites, doing math, sending emails, talking to Excel, and many other things….

Getting Started with Podcasts 2019-07-21 | 420 words

Do you like history or news or science fiction? Do you drive a lot or like to listen to things while you work? If so, you should really try out podcasts! Podcasts are audio shows that you can find on the web or download on from a phone podcast app….

Jupyter Notebooks with Plotly 2019-04-18 | 365 words

Plotly is my current favorite Python graphing library. Here’s how to use it with Jupyter Notebooks

Favorite Recipes 2019-03-10 | 2257 words

These are some of my favorite recipes that aren’t from the internets. Ones from my Grandma Howe are prefixed with “Grandma Howe’s “. Some of them have other sources in the recipe that I’m placing in italics.

Listening to Videos on Android with the Screen Off 2018-12-10 | 109 words

Android apps can make it surprisingly difficult to listen to videos. Often times, I want to turn on a video, then just turn the screen off and listen to it. Luckily, FireFox with some plugins will let me do that.

A Simple Go JSON API Server with Tests 2018-12-10 | 1124 words

I’m trying to make a small bookmarks server. I’m using code similar to this to create a server, and test 2 GET APIs. I’m incorporating the following ideas from Advanced Testing in Go:

Subtests/Table driven tests Golden files Test fixtures

Jupyter Lab on Docker 2018-10-24 | 346 words

Assuming you have Docker installed, setting up a basic Jupyter Lab environment is pretty easy! I’m going to be installing the jupyter scipy-notebook. The following command mounts a directory with the correct permissions for the Docker user to access it.

Setting Up Static IPs and DNS 2018-10-09 | 307 words

I want machines on my network to be able to talk to each other via hostnames (fqdns). Here’s how I set that up.

Short BASH Snippets 2018-09-09 | 1111 words

BASH script starter

Logging in Python 2018-09-05 | 1177 words

The logging module is rather confusing, so I use it with code similar to the following.

Go Notes 2018-09-04 | 319 words

These are things I want to remember in Go

My Favorite Text Diagram Tools 2018-08-20 | 298 words

I love that diagrams can make difficult concepts intuitive. I hate that generally they’re stored in opaque binary formats, which make them difficult to version control, and that generally they’re created by clicking and dragging buttons and boxes around. Typing is generally much faster and less frustrating.

Pork Loin with Apple 2018-07-31 | 79 words

NOTE (Sun Mar 10 - 2019-03-10 23:18:54 PDT) : I’ve moved this recipe to the Favorite Recipes post. I’ll be removing this page after some time has passed.

Grandma Howe’s Povitica Recipe 2018-07-10 | 744 words

This isn’t my usual computery blog post, but it might be the most technical. This is a seriously complicated bread to make.

Grandma Howe’s Cheese Ball Recipe 2018-07-10 | 226 words

NOTE (Sun Mar 10 - 2019-03-10 23:18:54 PDT) : I’ve moved this recipe to the Favorite Recipes post. I’ll be removing this page after some time has passed.

Learn Git 2018-03-26 | 392 words

Git is a famously powerful and famously confusing version control system used by software engineers everywhere. Increasingly, as other types of work begin to look more like software engineering (in my case network and systems engineering), git becomes useful for those folks as well. In that regard, here are some…

Short Python Snippets 2018-03-14 | 1579 words

This is just a collection of Python snippits that are too small for their own posts. All code is for Python 3.

Ansible User Notes 2018-02-01 | 852 words

Ansible has two types of users: become_user and remote_user (and the deprecated ssh_user and sudo_user that I won’t cover). Here’s how to use them:

Printing Objects in Flask 2018-01-22 | 724 words

Recently I needed to painlessly enumerate a (simple) Python object’s properties in HTML to make a web page. I was creating different types of objects and I just wanted an easy way to print them. This post is how to do that in Flask.

Polymorphism in Handmade Hero 2018-01-12 | 1006 words

A while back, while watching Handmade Hero, I watched Casey demonstrate one way to produce polymorphism without inheritance (and the vtable pointer dereferencing penalty it carries). He did this by using a tagged union to hold the derived classes, and switching on the tag in the polymorphic method (actually a…

Fixing HTTPS CA Cert Issues 2018-01-11 | 1005 words

Disclaimer: I’m very new to understanding SSL, and I haven’t yet put in the effort to be authoritative about this subject. This post describes how to work with a modified chain of trust from a VM without the last certificate installed.

Auto-printing Python Classes 2017-12-19 | 1408 words

This article examines different ways to generate repr functions. But, just to be clear, here are my recommendations in order:

An Isolated and Reproducible Ansible and Vagrant Setup on Mac 2017-10-27 | 1620 words

Ansible is a great tool for automating system maintenance. This is how I install it. My notes differ from the official ones in the following ways:

Learn SQL 2017-10-10 | 450 words

SQL is one of the best benefit/cost skills to learn. It’s fairly easy to learn, and it immediately becomes useful for many jobs- including software engineering, accounting, law, or any other job that deals with data.

Simple Blog Post Stats 2017-10-08 | 871 words

I got curious about the word count in my blog. When I generate the static site, I simply count whitespace separated strings as words, but this will automatically include code sections. To find out how much prose I wrote, I need to process each blog post, ignoring the front-matter (information…

Anaconda Python Bash Functions 2017-10-07 | 440 words

Conda Env Management

REST Server and Client in Python 2017-09-22 | 491 words

I recently demonstrated a very quick REST backend server and client in Python for an intern, and I thought I’d paste the code here.

Ansible Plus Flask 2017-08-24 | 524 words

I was lurking on the networktocode Slack channel, when someone asked how to get variables from an external system into an Ansible playbook. Intrigued, I mocked up a quick Flask server to serve a REST API, and a playbook to consume it. This proof of concept happily ignores a lot…

Changing words quickly with Vim 2017-08-11 | 568 words

I try to use Vim shortcuts to automate repetitive text-editing tasks. Here are two examples.

Dropbox as a systemd service 2017-08-04 | 419 words

If you’ve ever worked with Dropbox on Linux, you know that you basically download a script, untar it, and execute it.

Tiling Crosses (Linear Algebra in disguise) 2017-08-03 | 809 words

I was doodling with crosses on graph paper and was surpised to see that I could cover the graph paper with only cross shapes. They also look pretty neat when colored oddly, so I wrote code producing images similar to the below image to play with them more efficiently. While…

RSync From Android 2017-07-18 | 605 words

Every once in a while, I like to transfer a folder from my Android phone to my Mac. This folder has new content added every once in a while, and the files get large, so I don’t want to re-transfer the already-sent files. Rsync is a perfect tool for this….

Reproducible Python Environments with Conda 2017-05-17 | 1064 words

By default, Python doesn’t handle binary dependencies very well. There have been several occasions when I’ve tried to pip install library and it just choked on me because it was trying to compile something and I didn’t have the magic combination of compiler versions and build tools needed. At the…

Windows Volume Control with AHK 2017-05-13 | 147 words

This is some code I use at work to control my laptop’s volume and mute it when the I locked the device. It was born from the frustration I felt when frantically tying to silence my music while my coworkers laughed at me that one time I locked my screen…

Path Name Conventions 2017-05-03 | 192 words

I recently did some BASH scripting that dealt a lot with paths. I want to record here for posterity the conventions I used to keep things straight, copied straight from the code.

Creating a shared folder in Linux 2017-04-25 | 291 words

Sometimes it’s useful to change a folder’s setting so multiple users can access it.

Troubleshooting Connections 2017-01-30 | 948 words

I recently had to set up a server with some legacy code that needed two database connections that just wouldn’t connect. This is how I troubleshooted it

Clearing Large Files 2017-01-23 | 468 words

I have a couple methods to clear large files. First of all, if the files are repetitive, logrotate looks to be the best way to roll.

Easiest way to turn a Jinja2 template into an HTML file 2017-01-17 | 103 words

The docs talk about using the environment or whatever, but for my use case, I usually prefer the FileSystemLoader:

Vim Color Schemes 2016-12-18 | 1056 words

One of the joys of [Neo]Vim is the amount of color schemes available. The editor ships with several colorschemes by default, but adding more is what Vim was made to do!

On Errors in Repeated Functions 2016-12-16 | 1001 words

Recently I found myself parsing several similar XML files in Python. The XML had a deeply nested structure I wanted to get stuff out of, which means using Python’s xml.etree.ElementTree’s find and findall methods:

Saving YouTube Playlists to Android 2016-09-25 | 136 words

I use the following method to update the songs on my Android phone:

Removing Passwords from a Git Repo 2016-09-19 | 344 words

When googling how to remove passwords from a git repository, I found this very helpful link.

BASH Logging Function 2016-09-09 | 166 words

This is a small BASH logging function to record the output of a command:

Saving For Retirement 2016-07-16 | 703 words

I got an email a couple of months ago from a coworker about saving for retirement that included the following graph:

Setting Up PowerShell Updated 2016-07-14 | 271 words

I’ve streamlined and improved my method of installing PowerShell:

Save Git Passwords 2016-07-13 | 49 words

I save my github usernames on my local machine with the following command:

SQLite3 Snippets 2016-07-11 | 228 words

~/.sqliterc customizations

Vagrant and Chef 2016-06-23 | 419 words

Using Vagrant to play with Chef

Quick Python Diff 2016-06-13 | 182 words

If you need a quick, cross-platform diff between files that makes a nice HTML document for your perusal, Python has your back:

MySQL To File 2016-06-06 | 204 words

How To Use a MySQL command on the BASH command line

Visual Studio with SourceTree 2015-03-23 | 439 words

When working on long or complicated projects, source control can save a lot of heartache. Git is becoming the standard source control tool, and I use a program by Atlassian called SourceTree to easily manage my repositories. In this blog post, I’m going to set up a repository (uesually shortened…

How I Blog 2015-03-23 | 728 words

Here are some notes about making blog posts (especially easily adding images).

Wallpapers From Reddit 2015-02-28 | 515 words

A while back, I found a nice script to download wallpapers from Reddit. It originally only downloaded wallpapers from one subreddit at a time, so I made a fork to handle multiple subreddits and use a JSON configuration file (the multiple subreddits feature has since been merged into master).

Setting Up PowerShell 2015-02-23 | 905 words

This is a post about how to use Powershell, the text-based interface to Windows. Now, why would we want to use Powershell? The biggest reason is automation. A person who knows Powershell can automate repetitive tasks away.

My First Real Post!! 2015-02-23 | 37 words

I hope to do many exciting things here!