Adding DuckDuckGo Search to Your Website

Since my website is now powered by Hugo, the website just a bunch of static files. While that’s great for speed, one downside of being completely static is that there’s no dynamic searching capabilities built-in (such as with Wordpress).

A popular option is to add a DuckDuckGo search box to your website, which is great because your users get to take advantage of their great searching algorithms to search your website.

The primary downside to this approach, however, is that despite some limited styling options, the search box will likely look out of place on your website. Thankfully, there’s a very simple solution to this problem: create your own search box that directs the user to a DuckDuckGo search page.

Continue reading... was added to the Hugo Showcase this morning. I had to fork their hugoDocs repo, add my site, and then make a pull request on GitHub. I did that really late last night, and my pull request was merged in this morning — that was fast. in July 2017

Migrated From Jekyll To Hugo

A few weeks ago, after experiencing slow compile times with Jekyll and being frustrated with my publishing workflow, I decided to explore other static website generators. That exploration led me to Hugo, which is a little different than most other static site generators in that it is a native application with no dependencies (Hugo is built with Go; Jekyll is a Ruby app).

I ended up porting my entire website to Hugo and I now have an awesome publishing workflow. But before I get into that, let me delve a little deeper into the problems I was having with Jekyll that led me here.

Continue reading...

My resumé is online. Full up-to-date and current. Finally. And although I’m not looking for a new job (I love working at Fingerprint!), I’ve been meaning to update my resumé and get it online for quite a while now.

Arrow Functions in JavaScript

The ECMAScript 2015 (ES6) standard introduced “arrow functions” to JavaScript, which on the surface looks like syntactic sugar over JavaScript functions, but have some subtle—but useful—differences.

First and foremost, you can use arrow functions anywhere you would use an anonymous function. For instance, in a timeout:

setTimeout(function() {
  console.log('Timeout reached')
}, 500)

In ES2015, the above can be written as:

setTimeout(() => {
    console.log('Timeout reached')
}, 500)

NOTE: In the above examples, we have no parameters (), but if we had only one parameter, we could leave off the parenthesis and that would still be valid. With arrow functions, zero or more than one parameter requires parenthesis.

Continue reading...

Digging Through the Archives

This website started life as a Tumblr blog ( way back in 2010 before I finally registered a domain name for it ( Since then, my life has changed immensely, and so has this website. I’ve reset it and reboot it more times than I can count. Recently, I started posting entries to this site once again. This time, however, I decided to take a different approach.

Rather than blowing everything away and starting new, I thought I would attempt to scour the internet for all traces of past incarnations of this website and restore the archives. Thanks to the Wayback Machine, I was able to restore most of all my previous entries. I also discovered that I had written a lot more over the years than I realized.

Continue reading...


Today I published a new package on npm: xcfg.

It’s a cross-platform config file management package that’s fairly simple, but pretty useful for those who write Node.js applications such as command-line utilities or desktop software in the form of Electron apps.

Since all the details of the project are on the package page, this entry will just cover the technology I used to create it.

JavaScript (ES2015)

First and foremost, this is a JavaScript package for the Node.js ecosystem, written using the ECMAScript 2015 standard. I had explored Python 3 recently, but ultimately decided to move forward with the Node.js ecosystem. I was momentarily torn between the two, because I think Python 3 is a fantastic language. However, I’m vastly more comfortable in JavaScript, and I’m a big fan of Node’s package manager (npm). Conversely, I really don’t like Python’s distribution story. In fact, I think it’s a nightmare compared to the npm experience.

Case in point: I started writing xcfg yesterday evening and finished up the remaining tests and documentation this evening before finally pushing the project onto GitHub and running npm publish. It’s a small package, so that’s obviously why I was able to finish it in such a short amount of time, but the process of setting up a package.json and publishing to the npm registry was an absolute breeze. Publishing added only a very minimal amount of time and effort on top of coding, writing documentation, and adding unit tests.

Continue reading...

Python for JavaScript Developers. Published in November of last year by Mario Pabon. Very useful for experienced JavaScript developers who are trying to get up to speed with Python 3 quickly.

Array.prototype.splice() in Python

I’ve been digging into Python 3 lately, and so far I’m really liking it. One of the things I miss coming from JavaScript, however, is Array.prototype.splice(). Although Python’s list (and string) slicing syntax is really convenient, things seemed to get unnecessarily complicated when I wanted to insert and remove items at an arbitrary position within a list. The simple one-liner I was used to in JavaScript became a multi-line affair in Python.

Given the breadth of Python’s standard library, I was surprised I couldn’t find the same functionality buried somewhere. And while it’s possible it’s there and I just haven’t looked hard enough, I thought it might be fun to port over JavaScript’s implementation anyway.

Here it is (also available as a Gist):

Continue reading...

BBEdit Light theme for Sublime Text

Despite moving “Back to BBEdit” back in 2014, I’ve since had to move back to Sublime Text 3. Something I really missed though, was the default color scheme that shipped with BBEdit 11.

While I did find some ports of the older default BBEdit color scheme, I couldn’t find the easier-on-the-eyes version that came with 11 as a tmTheme, so I was forced to port it over myself.

BBEdit Light for Sublime Text

To install, copy BBEdit-Light.tmTheme to ~/Library/Application Support/Sublime Text 3/Packages/User/ and restart Sublime Text. It’ll then be available in the Sublime Text > Preferences > Color Scheme > User menu.

HostGator $3.96

$3.96 for web hosting – used by Get started today.