Archives for April 2012

Back to Archives

Authenticating a Google Service Account

I spent a few hours at work today trying to make sense of Google's new OAuth2 service accounts, implementing code to generate the JSON Web Token it wants and then query Google's auth server to get the OAuth token. Google intends the accounts to be used by backend services, which makes a lot more sense than shoe-horning them into access via some user's account as is normally the case.

Only after I had all that and I tried to make an API request did I realize that Google doesn't support service accounts in Analytics yet, so all of that work was in vain. To try to keep it from going to waste, I figured I would post it here. Looking to authenticate a Google service account for a Ruby app? Hopefully this will save you a little time. — Continue Reading...

Scratching your own itch...

KPCC To Go App Screenshot Eric Richardson

It feels nice to be able to build something that scratches your own itch, even if it may be one that no one else has. This morning I commuted to work while listening to some "nearly live" radio via a small iPhone app that I put together to work with StreamMachine, my experiment in next-gen streaming audio server.

While we didn't get picked to receive the grant I wrote about a few weeks ago, I've been saying for several months now that I really wanted an app to let me grab a commute's worth of audio just before I walked out the door and onto the subway. — Continue Reading...

Extra terabytes

Terabyte Hard Drive Eric Richardson

Six years ago today I added up all the hard drives in my apartment and got ~1,210 gigabytes. The largest single drive was 250 gigabytes.

Today I have a two terabyte drive that I use for backups, and 750 gigabytes inside my laptop. Another terabyte drive (the one pictured) is sitting on the desk, but not being used for anything in particular.

I still marvel at how cheap storage has gotten, and how quick it has gotten there.

A Return to Reading

iPad Books Eric Richardson

When the new iPad came out a few weeks ago, I hopped in the car and took a drive over to the Apple store at The Grove to pick one up. I had been intrigued but not seriously tempted by the first two models, but this time the new screen and a growing fascination with mobile devices made it something I couldn't resist.

My first few weeks have produced an interesting result, though: they've made me a reader again. — Continue Reading...

Making Django and Rails Play Nice, Part 4: Nginx Conditionals and Passenger

I got distracted and never managed to post the last piece of my look at making Django and Rails play nice together for KPCC's new beta website. Part one looked at mapping generic relationships with MySQL views, part two at building interoperable sessions and part three at creating an interwoven caching model.

Once you've got all those pieces in place and have both applications happily running off the same data, though, you still need a way to route incoming requests to one or the other. That could be something that you handle in logic on the load balancer, but our setup instead left this as something to solve as the request came into the web server. Turns out, though, nginx made it all quite easy. — Continue Reading...

Brookgreen Gardens

Brookgreen Gardens Eric Richardson

Kathy and I are in South Carolina visiting family during her Spring Break. Just up the highway from our house at Litchfield are Huntington Beach State Park and Brookgreen Gardens, a pair of properties once owned by Archer and Anna Hyatt Huntington.

My family used to camp at the state park every year, so I've spent much time on that side of the road, but I can only remember once that we had ever visited Brookgreen, the sculpture gardens that the pair opened to the public in 1932. We paid a return visit this week and really enjoyed wandering around the former rice plantation. — Continue Reading...

Logging in JSON

I happened to wander past the node.js blog yesterday and read this article on Bunyan, a logging framework built around JSON.

It was a fortuitous coincidence, since I was looking for ideas on how best to implement logging inside StreamMachine, the rewindable streaming audio server I've been playing with at KPCC. — Continue Reading...