Garet's Words

· 3 minute read

What do I listen to while programming?

Music is, of course, a slightly touchy and very subjective topic. Especially when discussing what to listen to while doing various tasks. Though for me personally, I have clear-cut answers to what works best for me while programming. To start with, I typically avoid anything containing vocals. I like massive ambient soundscapes with intricate details. It seems to stimulate the logic-processing parts of my brain (whether or not that's true, I have no idea). But it definitely keeps me productive. Tracks like this one by Shulman are among my favorites. I also prefer listening to longer tracks or full album mixes instead of single tracks. This is because when tracks are constantly changing, I feel like my mood and productivity is also changing. It takes a little bit to get situated into a…
· 7 minute read

Let's talk about my first day with Gatsby

It all started with a single tweet... Gatsby had been on my radar for a long time, to say the least. I had first checked it out when it was still what seemed to be a side project for Kyle Mathews . I tried it out and happily gave it a star on GitHub. It was a nice experience, but nothing that I was exceptionally excited about. This was all mid-2016 when JavaScript-Fatigue™ was still very much at its peak. For that reason alone, I was apprehensive to fully adopt such an infantile library. Shortly after that, however, I saw this tweet from Kyle Mathews. At that moment, Gatsby had fully piqued my interest. It definitely seemed to be a risky move to an outsider, but I had seen Kyle's work and admired his dedication to the project, so I was fully interested to see where this would go…
· 1 minute read

My first Gatsby plugin: gatsby-remark-embed-soundcloud

I recently dove deep into the world of GatsbyJS and have been absolutely loving every minute of it (post about that coming soon). But one of the first things I wanted to do in order to really get a feel for the engine, was to write my own plugin for it. After traversing the official plugin list , I noticed that there wasn't yet an automatic SoundCloud embed yet. Since I use remark for rendering my Gatsby blog, it only made sense to create a remark embed for SoundCloud. You can find the plugin along with the documentation here . I wanted to make it dead-simple, so there is literally zero markup required on the user's part, just paste in your SoundCloud link and it will automatically generate an embed code for it. You can customize the size, color, and whether it autoplays when loading…
· 2 minute read

Why comma-dangle is important in your open source projects

Let’s talk about comma-dangle . More specifically, let’s talk about why you need to be using this eslint rule in your open source projects. Actually, scratch that. This is something that’s best learned through examples. Allow me to walk you through what happens when you don’t use the comma-dangle rule. The Example Okay, so let’s pretend we have an awesome open source project we just created called beer.js. Let’s go ahead and add some exports to our package See all the lines prefixed with a ? Those signify new additions to our repo. For our initial commit, we’re gonna have line additions and deletions. Let’s go ahead and add another value to our beer object Now what happened here? We only added one value to our export, yet git is going to show additions and deletion. No doubt our…
· 2 minute read

Should you use gitmoji in your commit messages?

tl;dr not yet. 📝 Semantic Commits v2.0 I love emoji . If you follow me on any social sites, you’re well aware of that fact. I love it so much, I even base my application choices on how well they support it (I’m looking at you, VSCode 😑). But the one place that I absolute adore using emoji in, is the CLI. For most non-millennial developers, that very idea may disturb you down to your very core. But you’re only fooling yourself if you honestly don’t see the benefit of having a massive library of standardized icons available at your disposal. That said, are emoji ready for the limelight in something as permanent as commit messages? Obviously if you read the tl;dr above, you already know my answer. But let’s talk about why. For being semantic, they’re extremely un-semantic. It’s easy to…
· 7 minute read

75% less mouse, 100% more productive —a vim story

What if I told you I had a secret weapon that could make you a faster programmer… would you believe me? What if I told you that part of the secret to becoming a faster programmer is removing one of your input devices from your computer? … You’re kidding me right? Not at all. In fact, I can work an entire 10 hour day without ever touching my mouse or trackpad while coding… and so can you. In fact, this entire blog was developed without the use of a mouse —other than testing in a web browser. What I’m referring to, is the vim way of working. I’m sure you’ve used vim at least a few different times before. It’s that little text editor that you only use on your linux server and can never seem to figure out how to close or save a file. But it’s more than that... It's more than an editor. Vim is…
· 4 minute read

Monitoring BitTorrent Sync with Monit on Ubuntu 14.04 LTS

Over the past few days, I've been doing tons of DevOps work. Lots of setting up server monitoring, security, and automation. Most recently I wanted to give monit a try, as I've heard some good things about it. I was able to install it and get it up and running pretty hassle-free. I added in a few process checks for nginx, php-fpm, and postgres and it instantly was able to start tracking those processes for me. If you've gone through some of my other posts, you might remember a guide that I wrote about settings up BitTorrent Sync on a remote server, well today I'm going to expand on that a bit and add BitTorrent sync into my monit checks! There were multiple apparent walls that I was going to run into, as BitTorrent sync wasn't exactly written to be placed on a web server, so it lacks a few…
· 5 minute read

A Complete Guide to Creating Your Own Private Dropbox-like Server

The problem: Your data isn’t safe in the cloud On a daily basis, many people are constantly backing up files on their personal Dropbox drive. While there’s really nothing wrong with this, what would happen if Dropbox were to get hacked? I’m sure nobody saw it coming when PlayStation Network got hacked , yet, around 77 million people had their personal information stolen. What would happen if that same thing happened to Dropbox, where millions of people store sensitive data? Sure this is probably an extreme case, but one that hits closer to home would be the recent unveiling of project PRISM. Do you really want the National Security Agency (NSA) to have access to your data? Of course there’s still risk of your own personal servers getting hacked or monitored by the NSA, but a data…
Garet McKinley's Signature