25 posts about
code

Adding SSL to Ghost on DigitalOcean

This morning I went through the unexpectedly pleasant experience of adding an SSL certification to this site. Turned out to be much easier than I planned on, and there was only one small hiccup I was able to resolve quickly. I opted to go with a free Let's Encrypt SSL/TLS Certificate and use...

Modifying Body Attributes in React

Quick tutorial on how to add attributes to the <body> element within a React app. There are many use cases for this - the primary being to add a class (e.i. <body class="some--class">, and it works for any other attribute. The reason this is needed is because the...

PunkAPI Javascript Wrapper

This weekend I created a Javascript wrapper for the PunkAPI - an unofficial API for querying beers from the BrewDog DIY catalog. Even if you're a developer some of that might not have made sense. BrewDog is a brewery, started in 2005 in Aberdeen, Scotland, who now operates dozens of beer bars around the...

Secure Environment Variables with Travis CI

While building a web app you'll often need to have access to different variables depending on the setup (or environment). For example, your local machine, the staging/testing server, and development servers are all different environments. On each of these environments you might need different settings. On your local machine your app might connect...

1,000,000 People Reached

Stackoverflow, one of the many StackExchange community of sites has been one of, if not the most, influential resources for my coding career. If you're not familiar with it, Stackoverflow is a Q&A-style site for asking and answering questions related to programming. By answering (and asking) questions users earn reputation when their...

NPM Package - Git Trim Stash

If you're anything like me when it comes to coding your git stash is likely a bit long. A quick git stash list on any of the repos I'm currently working in will reveal a few dozen stashes. I find stashes extremely useful when experimenting with ideas and I don't necessarily want to completely...

Side Project: UnlockSwarm.com

I'm a huge fan of the Swarm mobile app. If you're not familiar with Swarm, it's an app for checking into venues, built by Foursquare, that makes your everyday travels into a competitive game. By checking-in to new venus, in new locations, more frequently (among other factors) you earn (virtual) coins, and win the...

Parallel Promises in Node (or how to wrangle multiple Promises)

Promises offer a much easier pattern for handling asynchronous requests. Compared to the callback pattern Promises allow for much cleaner and maintainable code. A common pattern encountered when working with APIs is the need to do several requests at once, and return all the data in a single response. For example: Imagine an app...

SSL Certs with DigitalOcean and Comodo

This past weekend I installed a SSL Certificate onto a DigitalOcean Droplet (Ubuntu/Apache). The droplet runs a little side-project of mine - a fan site for the Swarm app where I test and try ideas, frameworks and technologies. During installation I encountered a few hiccups so hopefully this can save some others some...

Slack Theming

Themes for Multiple Teams As a remote developer/teacher Slack is one my most important tools. There are 5 teams I communicate with on a regular basis: Developers/PMs at Citrusbyte Developers/PMs for our primary client Students at Thinkful Mentors and admins at Thinkful The local Bozeman JS Meetup group In addition to...