Benchmarking Node.js, Express, Hapi and Koa

As a software engineer for a company that generates analytics for advertisements, one technology that we leverage heavily is Node.js, which serves as a collection service for incoming status events when a user is watching a video. We had initially written the code that is doing this task a few years ago, when the newest stable version of Node.js was 0.10.18, and the “Express” module was in the 3.x branch. I’ve been looking to update our code to newer modules, and newer binaries, but updating doesn’t always mean a performance boost. I’ve read a lot about benchmarks comparing 0.10 and 0.12, and had seen people find 0.10 beating out the newer binaries, which fuels my caution about upgrading blindly into Node.js 4.1.0. Additionally, I have also been considering trying other web service modules, besides Express. Koa and Hapi have been getting attention, and I’ve seen benchmarking between all three, but I have yet to see a cross comparison with different versions of Node.js. I wanted to find out what branch of Node.js works the best with each module. Being that we have hundreds of Node.js processes behind load balancers, together handling 100s of million events per day, any minor change in performance could make a huge difference. If I’m going to make a change, I really want to be sure that it is a well informed one. Read more »

Teardown of T-Com VB / Buyee BT Motorcycle Bluetooth


I picked up this relatively inexpensive Bluetooth device on Amazon recently, and while it functions very well, I was finding that the over-ear speakers let in too much air noise when on the freeway. So, I’m planning on replacing the speakers with some in-ear buds, or maybe just a female 1/8″ audio jack, so I can switch headphones when I would like. As in any hack / mod, it’s best to start by doing your research. I could tear the current headset apart, but I wanted to see what I could learn first without ruining anything. Because I wasn’t able to find any photos of the internals of this device, so I have taken the photos myself, in hope that they help someone else. Read more »

Configure git to ignore a range of code

I had been asked to recompile a VPAID ActionScript SWF with a minor change to the code, but I had a lot of stuff lingering in my build I would like to temporarily disable, by commenting out, then only commit the minor change asked by using prune, ie: git add -p There was a lot of things that had changed, and it was becoming difficult to spot the changes, with all of the commented out code everywhere.

A few Google searches later, I stumbled upon a neat solution which meets my particular needs. I can mark ranges of code, and have git commit / diff ignore them. Then I can mark things that are commented out, and/or not meant for commit, and they will not be in my way. Read more »

Recovering Arduino Pro Micro Atmega32u4


I was doing something with foolish in avrdude, ending in me killing the bootloader on my Arduino Pro Micro . The Arduino Pro Micro bootloader creates a USB connection which the user can upload code, however by overwriting the bootloader, the chip no longer enumerates as a USB device and can no longer accept new sketches. Fortunately, I hadn’t messed up the fuse bits, so I can still upload using ISP. There wasn’t much documentation on doing this for a Pro Micro, so I had to look up the data sheets for the chip and trace the Eagle PCB schematics. Fortunately, all of the ISP connections are accessible via the pin headers. I used my USBasp, but any ISP programmer including another Arduino running Arduino ISP should work. Read more »

Raspbian slow SSH fix

I had been noticing that SSH and rsync were unusually slow to connect on my Raspberry Pi running Raspbian. I had initially assumed it was due to the small CPU, but after doing some searching around, I had found that adding an extra setting in SSHd’s config fixed the problem.

in /etc/ssh/sshd_config, add:

UseDNS no

Then restart sshd with “service ssh restart”.

Grbl CNC USB to TB6560 Interface using Arduino

photo 1

I’ve had a CNC mill for a few years now, and while many homemade CNC mills use EasyDriver or Pololu, mine came with a sturdy, generic TB6560 controller board. For those unfamiliar, boards like this are interfaced using an old fashioned LPT parallel port, which was initially an annoyance, but quickly became impractical and a hassle, having to use an old PC with VNC installed. The board has plenty of power to push the steppers around, far more than any of the smaller / cheaper solutions had to offer I think, so I wanted to try and teach this board a few new tricks, and let me interface with it using a more modern interface. Read more »

Hacking USB into an Alfa AP121 router

Flipped TTL serial lines.

While checking out all the awesome things you can do with a Fon Wifi Pineapple, I thought it would be fun to grab a newer router, capable of running Pineapple Mark-IV. I found what I thought was a great deal on eBay, and upon closer inspection, I had bought an Alfa AP121, which lacks the USB it’s sister model the AP121U / Hornet-UB has. I could have resold it, but my solution was to reverse engineer it, and try to add the USB myself. Read more »

Adding a free Aux in to a 2007 Prius


Much to my dismay, the stock radio in my 2007 Prius did not include an AUX in port for hooking up an iPod. Searching around, it turns out that the 51824 in my car does have a CD changer port, and does have the AUX pins, however they don’t function. I even bought an adapter on eBay to use the CD changer port with an external source, and the stereo didn’t even take any notice of the adapter. I sent it back, and instead opted to replace the whole radio with a 51824, which does support these features. Read more »

Cracking the Sentry DS0100 Safe

I found a trashed combination safe on the sidewalk recently. Here’s a very quick, to the point method of opening it with minimal damage. I watched a few other videos and wanted to try and keep the safe undamaged, and still fully usable. After shooting the video, I filled the hole I drilled with epoxy and also used a little bit to stick the faceplate back on. In case anyone was curious, it wasn’t filled with $100 bills.

iPod Video failed capacitor


My brother recently got an iPod Video off eBay which refuses to keep a charge for longer than 30 minutes. I suspected it was an old battery, and thought it could be fixed by swapping in another one. Once I got the case open, I discovered a burn mark on the back on the hard drive foam, pointing out that there was a blown out component on the main board. Lovely. Read more »