A -post collection

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 the automated installation from certbot. The certbot instructions were straightforward and only took a few minutes to complete, but did result in one issue, so here's a quick tutorial on how to add an SSL cert to your Ghost site quickly. First, a few specifics about my current setup: Ubuntu 14.04 (trusty) Nginx 1.4.6 Ghost 0.11.10 Hosted on DigitalOcean Install the necessary packages sudo apt-get update sudo

Read more

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 <body> lies 'outside' most React apps. The recommended setup for React is to add a <div> within a page's <body> where your root component will be rendered, like this: <html> <head> </head> <body> <div id="root"> <!-- Root Component --> </div> </body> </html> Add

Read more

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 world. They recently broke into the U.S. market with a brewery in my hometown of Columbus, Ohio. They produce great beers and make the recipes for past brews available through the DIY Dog website. There's no official API for the DIY catalog so @samjbmason and others scraped the info from the DIY website and created an unofficial API. Their API is accessible via HTTPS and is CORS-enabled, meaning it will work

Read more

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 to a localhost database, while staging and development connect to AWS DynamoDB or MongoDB Atlas. Environment variables give you the ability to have different settings across these environments. Environment variables are typically stored in a .env file in your project directory consisting of key/value pairs. On your local machine the .env file contains key/values for your local setup, while the .env on staging and production contain the same keys, but

Read more

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 answers (and questions) are voted-up by other community members. There are also badges, earned by accomplishing certain feats - like answering old questions, editing questions, voting on questions/answers and more. Stackoverflow (SO) also has a Jobs section with many of the most highly sought-after employers advertising open positions. My past 2 positions, both of which I've loved, were found through Stackoverflow Jobs, and I receive interview offers nearly every month from

Read more