Erik Zaadi

The tales of a coding manager addicted to dad jokes

Recent Posts

Getting parsed Request Bin bodies Piping Request.bin to jq to node to awesomeness
The distributed state of ChatOps How Hubot is slowly replaced by integrations
Cheap IOT By Hacking Routers One must make effort to be lazy
Hush hush now Logstash Yo dawg, I heard you like to process logs with Logstash...
Bye Octopress, Hello Hugo Yet another blog platform migration
s3cmd is dead, long live s3-cli

For those of you that still use Octopress like me, one of the annoying things is deploying to Amazon S3.

I was using s3cmd which is indeed an awesome utility to sync the rendered blog to S3, however it’s slow, it’ll take about 5 minutes to deploy my blog, which is not a huge blog.

While implementing a quick hack that uploads images to Amazon S3, I stumbeled upon a certain Mr Awesome called Andrew Kelley - @andrewrk, who’s node s3 client I used.

Two bots one Slack

We started evaluating Slack at BigPanda, and it is truly great.

The signup process was super simple, adding integrations is really fast, and all the apps, web and native feels fresh and fast.

Needless to say, one of the first things I did was to hook up on of our Hubot instances that controls our door (see previous post).

With our previous not so hip chat, we did a quick hack, creating an Android Widget that calls our Hubot instance (called Bellboy), opening the door. Yes, a tad bit cumbersome, but this way we used the existing stack on our Raspberry Pi.

BigPanda's Raspberry Pi Powered Geekalicous Door

We recently moved to a new shiny office at BigPanda.

Before moving in, we renovated parts of the office, including the door. We got a door with an electronic lock, which usually is opened using a code panel.

Alas, we can’t have a simple code panel, we’re way to cool for that!

Like a sir

So we decided to hook up our Raspberry Pi to control the door.

Here’s the Raspberry Pi, all hooked up:

handle proxy 404 in nginx

In our SPA era, when you get a 40x or 500x (Oy vei) error from your proxied backend, you typically want to display a static part of your SPA.

To do this, we can usual a small but usefull nugget from nginx:

HERE BE DRAGONS

1
proxy_intercept_errors on;

This ensures that if the proxied backend returns an error status, nginx will be the one showing the error page.

We need to tell nginx to handle the 404:

Long time no spamming

TL;DR - Yet another ‘didn’t blog in a while due to ENTER EXCUSES HERE’ post..

I’ve moved on

I now work at BigPanda since March, and until now, I didn’t make time to write here..

I did get a chance to write a blog post at the BigPanda Blog about how we use vagrant, which was fun writing.

In the end there are only two reasons I stopped blogging.

  1. Number one: Refactor Syndrome