5 Quick Hacks for Your Ghost Theme

These “hacks” for Ghost add some cool features to any blog, and should be usable with any theme.

  Apr 1, 2017 (rev. Oct 11, 2025) ·  5 min

Migrating a Blog from WordPress to Ghost

About a week ago I decided to migrate my blog to the Ghost platform. I’d been thinking about it for awhile - even installed it once or twice to play around with it - but never fully committed. Truth is, I didn’t really want to switch. I knew that, however little, the process would certainly be more painful than doing nothing. So the pain of going through the switch had to be outweighed by the pain of not switching. I guess that finally happened. ...

  Mar 26, 2017 (rev. Oct 10, 2025) ·  14 min

Evaluating a string of code in Erlang at runtime

Did you know that Erlang has the ability to read in a string representing a line of code to execute at runtime? It can parse it out, evaluate it and return the value. Let’s see how… Evaluating Simple Expressions At its most basic, we can just read any expression passed in and execute it. 1 2 3 4 5 6 7 8 9 10 11 12 -module(parser). -export([ evaluate_expression/1 ]). -spec evaluate_expression(string) -> any(). evaluate_expression(Expression) -> {ok, Tokens, _} = erl_scan:string(Expression), % scan the code into tokens {ok, Parsed} = erl_parse:parse_exprs(Tokens), % parse the tokens into an abstract form {value, Result, _} = erl_eval:exprs(Parsed, []), % evaluate the expression, return the value Result. Let’s try passing in some simple arithmetic expressions, remembering that statements end in commas and functions with a period, so our strings need to include those punctuations: ...

  Mar 5, 2017 (rev. Oct 11, 2025) ·  7 min

What is charlieplexing? (a Raspberry Pi demo)

On past projects, when I needed multiple LEDs, I just connected each to its own GPIO pin. I knew the current only worked in one direction, but I didn’t think to take advantage of that fact. Charlieplexing is a method for arranging multiple LEDs so as to use the minimal number of pins possible.

  Feb 17, 2017 (rev. Oct 10, 2025) ·  4 min

How to Create a Git Alias

If you’re unfamiliar with Git’s “alias” feature, it provides a way to create shortcuts for other Git commands, which can save you a lot of time. They’re easy to setup and maintain too. Let’s see how.

  Jan 28, 2017 (rev. Oct 11, 2025) ·  4 min

5 Things You Can Do With a Locally Cloned GitHub Wiki

There’s a feature of every GitHub repo that in my experience doesn’t get a ton of love, and that’s the wiki. In all fairness, I’m not sure how much love it deserves - it’s sorely lacking in features. But did you know it’s a separate repo that you can clone and manipulate locally?

  Jan 16, 2017 (rev. Oct 11, 2025) ·  13 min

Comparing Two Objects for Equality in C#

It’s common to compare two objects in C# for equality, such as for a save operation. Let’s take a closer look at how we define what equal means.

  Oct 31, 2016 (rev. Oct 11, 2025) ·  7 min

Connecting an Analog Joystick to the Raspberry Pi

One of the best things about the Raspberry Pi is its GPIO pins. They’re just sitting there, waiting to be connected to all kinds of interesting peripherals so your Pi can interact with the world around it. We can send alerts, attach sensors, and even plug cards like the Sense HAT over top of the pins to do even more. A few months ago, I bought a set of 37 sensor modules. I knew they wouldn’t directly interface with the Pi, but that it was entirely possible to do it, so they were set aside for later. Well, it’s time to try one out, and I figure the mini-joystick might offer some interesting opportunities! ...

  Sep 24, 2016 (rev. Oct 10, 2025) ·  9 min

Creating a Flickering Candle Using an RGB LED on the Raspberry Pi

After getting PWM (pulse-width modulation) to work with an RGB LED last week, I was trying to think of what else I could do with an LED that demonstrated changes in color as well as intensity. I’m not sure why – maybe it was because we lost power in our neighborhood recently – but I thought a flickering candle could be an interesting little challenge… Materials In order to test this out, you’ll need a few things. ...

  Aug 29, 2016 (rev. Oct 10, 2025) ·  10 min

How to Use Pulse Width Modulation (PWM) on an RGB LED and the Raspberry Pi

If you buy a kit with random LEDs, wires, switches, etc, you’re likely to end up with one or two of those funky little LEDs that appears to be white, and has 4 wires instead of 2. I had set mine aside and made a mental note to figure it out later – well, that time has come! The code in this article is available on GitHub, if you’d like to use it or just follow along. ...

  Aug 22, 2016 (rev. Oct 10, 2025) ·  9 min