Finagle with scala-bootstrapper

I've been fascinated by the concepts in finagle for some time, but being a scala noob, I never knew how to bootstrap a finagle project. Turns out twitter has a gem, scala-bootstrapper, that generates a simple thirft based key/value store for you. There's even a tutorial on how to extend the example project into a distributed search service.

This is a guide on setting it all up locally, it assumes you have Git, Homebrew, and OS X.

1) Install scala 2.8.1

2) Install sbt 0.7.4 (assumes you have a ~/bin in your $PATH)

3) Install scala-bootstrapper

4) Generate finagle project

5) Add a Client class

create newbird/src/main/scala/com/twitter/newbird/Client.scala with

6) Running the server

7) Playing with the client

Bonus

finagle exports a stats url you can curl:

 

 

Alfred Extension for creating Wunderlist tasks

While looking for a way to add wunderlist tasks via alfred, I came upon this: http://jdfwarrior.tumblr.com/post/13163220116/wunderlist-for-alfred

Looked cool, but I wanted to write my own that didn't depend on php.

I used lsof to figure out the location of the db, then used file to see what kind of db it was. Luckily, it was sqlite3, so I was able to poke around and figure out the sql to create a task.

Here's the alfred extenstion that ties it all together:

user=`whoami`
wunderdb="/Users/$user/Library/Wunderlist/wunderlist.db"
sqlite3 $wunderdb "insert into tasks (name, list_id) values ('{query}', 1)"

Download it here: http://dl.dropbox.com/u/42561/wunderlist-capotej.alfredextension