Select Page

First Open Source Contribution


I genuinely did not plan on making my first ever open source contribution today. In fact, I didn’t plan on a lot of things happening this week at all. I recently got an awesome opportunity to work on a site that is being hosted on a platform called Pantheon, which I had not come across before. They’re an opinionated platform, meaning you need to adhere to their workflow in order to maintain and develop on the platform.

Pantheon Roman Temple in Rome

The Lead In

Luckily enough, I agree with Pantheon’s opinions about workflow and pipeline, so it’s been a really exciting platform to learn! However, I will say the biggest downside of being introduced to the platform was the fact that it just so happened to be during an emergency, and we were in a situation in which we needed to restore a backup, and a rather large one at that.

According to the official Pantheon documentation, one of the requirements to restore large sites from a backup is to use their own proprietary command line tool called terminus. I enjoy learning some new command line tricks as much as the next guy, but under stressful situations, it’s not as fun. As I was looking into all the steps required to install terminus and get it up and running, there were quite a LOT of prerequisites. Most notibly, it doesn’t run natively on Windows. (This is only a bummer because my work computer is Windows. Otherwise, I’m Linux everything anyway, so it’s no big deal, Linux is actually preferred.)

I just so happened to have spent some time setting up Windows Subsystem for Linux (WSL) just a few weeks before, so I actually had a great foundation to be able to start making my way through the install process. According to the README on their Github repo, the install for Ubuntu/WSL is “TBD”! So definitely concerning. Long story short, I was finally able to compile all the requirements scattered throughout the web, various Pantheon docs, GitHub issues some years old, and other visits to StackOverflow, you know how it is.

The Need

That was a few weeks ago. Now I’m in a situation in which I’m guiding a coworker through this same exact process, trying to remember all the tricks and commands and ‘gotchas’ all along the way. After spending another hour and change getting my coworker set up, I knew I’d likely have to repeat this process for new coworkers in the future. So in an effort to help myself and other devs, I decided to write a shell script that would install all the dependencies and set up all the required files and permissions exactly so terminus can run properly. (Why doesn’t this exist already?) Who knows. Doesn’t matter. Point is, I have a script I can use to install this tool quickly and easily without taking tons of time and running dozens of commands.

What I’ve learned

In going through this process, I ended up learning the importance of the && operator in bash scripting. This operator will only execute the code after it IF the code preceding it was successful. This is a great way to stop the script mid-way if something goes wrong or there’s an error somewhere.
On more of an “impostor syndrome” note, I’ve always been extremely intimidated by contributing to open source code. I’ve always assumed that everyone on GitHub is basically a rocket scientist and any pull request I make will just be laughed away and probably banned somehow… StackOverflow vibes? That. But I’m really glad I was able to come up with a script that can really help save myself and my coworkers’ time. At the very least, that’s enough for me. If my pull request get merged, that’s just icing.

Check out more articles

How to Exclude Specific Posts and Pages from WP_QUERY

For the sake of having something to work with, let's suppose we've got the following query:In this query, inside the $args array, there's a special parameter that allows you to exclude specific posts and pages from the query. This parameter is called post__not_in and...

Configure SSH For Password-less Connections

Preamble I'm slightly embarrassed to admit this, but it was a long time before I figured out how amazing this little file is and how exactly to put it to good use. The file I'm talking about is the SSH config file. By default, when you first connect to a server via...

WordPress Site Stuck in Maintenance Mode

Plugin Error Code 500 During Update While I was updating a WordPress plugin locally, something happened on my local server to trigger a 500 error code as the plugin was updating. On the frontend, I refreshed the page and was greeted with "Briefly Unavailable for...

Creating a WordPress Plugin Downloader

How it Started I was recently tasked with the challenge of creating a WordPress theme generator. The idea being, instead of writing your style.css file from scratch, you'd be able to just answer a few simple questions about how you'd like your theme set up, and those...

Fix Audio on XFCE Chromebook

The Problem After moving from GalliumOS to Xubuntu, I noticed that playing YouTube videos on both Firefox and Chromium would result in decent playback for a few minutes, but suddenly the audio would turn into a solid beeping tone while the YouTube video displayed the...

Adjust Trackpad Sensitivity XFCE

xinput set-prop "Elan Touchpad" "Synaptics Finger" 1 1 1 What are the values 1 1 1? This sets the sensitivity as close to the original ChromeOS as possible. Larger numbers will decrease sensitivity of various aspects. I never looked into which individual value...

Fireworks (Short Film) About the film Year: 2020 Director/DP: Tim Searfoss Writers: Matt Jones, Tim Searfoss Sound Mix: Matt Jones

Hosting Multiple Sites Using LocalWP

I've done a write-up on hosting local WordPress sites before, but I definitely prefer this method over the previous one. If you've never tried hosting multiple sites using LocalWP, then I'd encourage you to check it out. I've had really bad issues with it in the past,...

How To Load Javascript in WordPress

Doing things the WordPressy Way Yes, technically it's possible to just drop scripts into template files, but it's not the correct method to use on WordPress sites. WordPress is pretty particular on how it handles JS. Register Scripts via functions.php Just a heads up,...

How To Display Different Sidebars For Different Pages

Page Template (Best for Single Pages) If you only need to call a different sidebar on a single page and that page is totally unique, and there's no need to have a plan for children of those pages, then a simple page template should do the trick. Just go to your parent...