How to Debug Mocha Tests With Chrome

This post assumes you're familiar with Chrome's developer tools. Take That, WebStorm! I've long lamented that Vim will never have IDE style debugging, which is more powerful than any Vim feature. Until… I was browsing the Mocha documentation on a whim while waiting patiently for death, when I came across…

How To Set Up Devise AJAX Authentication With Rails 4.0

For whatever reason, there are several blog posts on how to accomplish this, and they all get it completely wrong. If you've found this page, I sincerely hope you haven't had to experience those. Learn from my pain. Devise can almost do this out of the box. We just have…

How to Clone a (Nested) Array in Javascript

The Problem David Walsh has a quick tutorial on how to clone an array in Javascript: var clone = myArray.slice( 0 ); This has an unmentioned danger. If your array contains nested arrays, the "clone" will contain references to the old arrays. Observe: var original = [ [1] ]; var cloned = original.slice( 0…

Free 3D Primitive Icon Set

While designing a 3D user interface, I came across the desire for some icons representing 3D primitives. I wanted a cube icon, torus icon, sphere icon, etc. After some searching I came up empty handed. So I made some! Here, you can have them. Preview You can just download one…

Flux For Stupid People

TL;DR As a stupid person, this is what I wish someone had told me when I struggled learning Flux. It's not straightforward, not well documented, and has many moving parts. This is a follow-up to ReactJS For Stupid People. Should I Use Flux? If your application deals with dynamic…

Journey Into Ketosis Part III

Warning: This post contains shirtless pictures of me. TL;DR Ketosis has treated me well. I share expected and unexpected results. Six Months of Ketosis In Part I I talked about what ketosis is and how to achieve it. In Part II I talked about my first month of complications.…