Bangs (exclamation points) in front of function definitions in Javascript?

author image
By Ben Radler

I recently came across a function declaration with a Javascript syntax that I had never seen before.

!function() {
  // some logic
}

This ! bang is called the unary operator.

I immediately started playing around in the Node console to try and understand this syntax.

Continue Reading

Github Pull Request Template for Gitflow

author image
By Ben Radler

Here's a quick helpful template that we've refined through our work at Boombotix and OneLogin: a short pull-request template that can be used to inform team members of the status and scope of a particular feature branch.

Click here for the template

Continue Reading

Deploy Yard documentation server to Heroku

author image
By Ben Radler

In a recent set of Rails services I built, my team wanted to quickly deploy to Heroku for testing. We also keep a YARD documentation server running and up to date for every deploy.

Turn out there is not a simple way to do this on Heroku, as you can only run one public-facing HTTP server per application.

Continue Reading

DIY Philips-Hue-Style LED Lights with Node.js + Backbone!

author image
By Ben Radler

Update!

Read this first, and if you want more I've posted an update to this blog here.

Video Demo

Backstory

My roommate works for Apple, and travels to China for work. He brought back a spool of LED lights, and hacked together a script for an Arduino that played a series of 12 lights on repeat.

Continue Reading

How to delete merged branches on Git and GitHub

author image
By Ben Radler

Recently at OneLogin we decided to prune and purge all merged branches in one of our large Git repos. Having never had to do this with more then a handful of branches, I had relied on the GitHub branches UI.

This UI is less than ideal when working with over about a dozen branches, so I started looking into scripts to help automate the process.

Continue Reading

© 2024 benradler.com. I love you.