Shell-ing With TypeScript

June 17, 2018

Here's a TL;DR for my future self when I inevitably forget the correct shebang to use. If you’re like me, most of your time writing bash scripts is spent Googling basic things like “how to loop in bash” while grumbling to yourself how easy this would be in a sane language like TypeScript.

My First "Hello, World!"

June 7, 2018

The other day, I ran across Windows 95 In Your Browser, which uses Emscripten and DOSBox to run a full-fledged operating system in a browser. What a time to be alive.

Live Reloading An Angular 2+ App Behind NGINX

May 14, 2018

Not my snappiest title, but this topic is too near to my heart to obscure with puns. Tight feedback loops are one of my favorite aspects of front-end development.

Fantastic Fast Fonts with system-ui

April 27, 2018

While building the Jekyll template for the latest iteration of my website (the site you’re on now), I discovered a new CSS trick:

Smart Date Searching with Solr

June 26, 2017

tl;dr: I created a custom Solr filter that allows for natural date searching. Here’s the source.


January 26, 2015

A quick note for context: this post was stolen from a portfolio site I built a few years back. It’s about my side project Inspirograph.

Auto-Ejecting Event Handlers

March 6, 2013

It’s often necessary to remove an event handler once the target event has fired and the handler code has been executed. Most JavaScript libraries provide this functionality stock - for example, jQuery users can make use of the .off() function, which takes a string event name (e.g. "click" or "hover") and a reference to the victim handler function.

The Diamond Operator Is Your Friend

December 25, 2012

Java 7 introduced a new operator - <> - referred to as the “diamond” operator. This new keystroke-saving syntax allows you to maintain the benefits of compile-time generics without typing out long strings of redundant type parameters. Prior to Java 7, creating and initializing a variable with nested type parameters was an arduous task:

Beware The Regex Pointer

December 13, 2012

Do not feed the wild regex.

A Breaking Non-Space?

December 13, 2012

Everyone who has fought with word-wrapping in HTML layouts is familiar with the &nbsp; HTML entity. This special “space” character appears like a normal space to the end-user, but the browser won’t break this space to wrap a line.

Removing SyntaxHighlighter Scrollbars In Chrome

December 13, 2012

I use the SyntaxHighlighter JavaScript library by Alex Gorbatchev on this site my previous site to auto-format chunks of code, resulting in nicely colored and tabulated blocks of text like this: