ES6 Arrow Function Stack Traces

Since I started writing ES6, I've adopted the functions without function approach and have quite liked it.

I'm not going to get into every reason why, but that post does a good job of echoing my thoughts on it. I'm not going so far as to say "never", but I don't think I've found the need to type the word function even once since I started writing ES6.

I have always wondered about stack traces when using arrow functions though.

Read more

Deploy a static subdirectory to GitHub pages

Update 8 Feb 2015

I came back to some projects after many months where I had used this method, and I was running into errors complaining about COMMIT_SHA is not an ancestor of commit when running the git subtree split command. I did some more research and found what I think is a superior method in the form of this shell script. The new method also allows the build directory to not be checked in to the git repository which I think keeps things cleaner.

So I packaged the shell script as an npm module so it can be installed to devDependencies and used it the same way as the previous method.

Read more

Finding All Your npm v0 Packages


Find all your v0 npm packages.

Lately, there has been some Twitter conversations about semver and v1. Here are some tweets from @izs whose opinion I trust when it comes to matters of packages and versioning.

Read more

Beep Boop: Ringing an R2D2 Telephone with Obihai, Asterisk, and Node

the R2D2 phone

I got this R2D2 telephone as a gift when I was in 6th grade(-ish). I used it in my room as a real telephone as a teenager, even though the handset was the most uncomfortable and least ergonomic handset imaginable. The ringer is the iconic R2D2 noise which will never stop being epic to me (maybe this is just because my name is Luke). In short, I love this phone.

The problem is I haven't used a hard phone in years, so it's been sitting on my desk as a piece of art. I've always planned on finding a better use for the talented droid, but never got around to it.

Then I saw this Twilio post about setting up a hard phone powered by their service. Even though I didn't want a hard phone (or to use Twilio), I still loved the hack. And then it dawned on me, I CAN JUST MAKE THIS PHONE RING. I thought it would be amazing to use the R2D2 ringer as a notifcation for events on my computer. And it was.

Read more

Symbolset and Bootstrap 3 Buttons

I've been using both Bootstrap 3 and Symbolset icons on a project, and I noticed the when using the icons inside buttons there are two issues:

  1. The icons look too big
  2. They are not aligned vertically

I wrote some very simple LESS code which I think makes them look much better.


Before and after: Symbolset icons inside Bootstrap buttons


.btn {
    .ss-icon {font-size:  @font-size-base - 2; vertical-align: middle;}
    &.btn-xs .ss-icon {font-size:  @font-size-small - 3;}
    &.btn-sm .ss-icon {font-size:  @font-size-small - 2;}
    &.btn-lg .ss-icon {font-size:  @font-size-large - 2;}