Select Page

First Open Source Contribution

Surprise!

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

Elevate Your Digital Presence with a Top Tampa Web Design Company

If you’re a business owner in Tampa, partnering with a professional web design company can make all the difference. In this article, we’ll explore the benefits of working with a Tampa web design company and how it can elevate your digital presence.

Create a Custom API Endpoint in WordPress

Creating a custom endpoint in WordPress to check for plugin updates involves several steps. This process includes setting up a custom REST API endpoint, creating a function to handle requests to this endpoint, and ensuring that the response contains the necessary...

Deploy WordPress Updates from a Private Repository

To push code to a private repository and trigger a pending WordPress update badge, you need to follow a systematic approach involving version control, continuous integration/deployment, and the appropriate use of WordPress hooks and filters. Here’s a step-by-step...

How to Generate a Ranger Config File

ranger --copy-config=all This will copy all the default config files from /usr/local/lib so you can make edits without messing anything up. Huge shout out to https://dquinton.github.io/debian-install/config/ranger.html for explaining this and so much more. Took me a...

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

Looking for a place to host your next project or design?

Use this link to get your first 4 months of WP Engine for free: WP Engine – Plans (With 4 months free)