Skip to content

Oauth-CLI - test your Twitter and other OAuth APIs easily

July 01, 2010

By the time I was working at Qype, I often had to deal with OAuth APIs. Doing example request works to a certain point quite good with a Plugin the for Firefox. But when it comes to Authorized or POST Request you’re stuck!

So I developed a tiny command line client, which allows you to send request easily. It comes as a gem and easily to install:

gem install oauth-cli

After installation, execute oauthc. You either make onetime calls, with giving all required data as parameter, or just go into interactive mode, to get a shell for multiple calls and history. For not stating all connection data over and over again, it comes with multiple profile support, a wizard to create those easily and presets for Twitter and Qype.

See this nifty example call:
oauthc -p twitter get statuses/friends.json

I hope you like it - Bug reports, suggestions, updates go to:

See Readme:

See Source:

Skypehotdeploy - How to autocommit & deploy a file

April 27, 2010

At Qype we had the problem of a college sending me a file which needed to get into the development trunk and updated on the production system. Problem was, he had

Skype auto accept file,

folder action on download folder.

my hotdeploy()

on adding folder items to this_folder after receiving these_items
my hotdeploy()
end adding folder items to

on hotdeploy()
set usr_home to “/Users/tobiasb/”
set prj_folder to usr_home & “Sites/qype_admin/”
set filename to “report_queries.yml”

set srcs to usr_home & “Downloads/” & filename
set dest to prj_folder & “config/” & filename

tell application “Finder” to set file_exists to exists srcs as POSIX file
if file_exists then
say “here we go”
do shell script “mv “ & srcs & “ “ & dest
set diff to do shell script “/opt/local/bin/svn diff “ & dest
if not diff is equal to “” then
#set commit to “/opt/local/bin/svn ci –quiet -m’SkypeAutoCommiter: updated report queries’ “ & dest & “;”
#set hotdeploy to “cd “ & prj_folder & “; /usr/bin/cap production qype:hotdeploy FILES=config/” & filename & “;”
#set out to commit & hotdeploy
set out to do shell script “/Users/tobiasb/bin/”
my message(“done”)
say “done”
my message(“no changes”)
end if
return “no file”
end if
on error the error_message number the error_number
my message(“error”)
say “error”
set the error_text to “Error: “ & the error_number & “. “ & the error_message
display dialog the error_text buttons {“OK”} default button 1
return the error_text
end try
end hotdeploy

on message(msg)
tell application “Skype” to send command “MESSAGE justalii SkypeAutoCommiter: “ & msg script name “to Alli”
#say msg
end message

My Snow Leopard (Development) System: Ruby, Rails, Arduino & Co.

April 27, 2010

- updated to Lion -

Here’s a (maybe incomplete) list of my Mac OS X Development system setup. Mainly for me to remember, but maybe a help for you too:

Main Development Setup
Snow Leopard Lion
xCode (or latest iPhone SDK)
Mac Ports, now I prefer Homebrew
Ruby: rvm + rubygems + rails etc.
Database: Mysql 5.1 + Sequel Pro
OpenVPN: Tunnelblick, or Cisco VPN client + Shimo VPN Menubar Addon
Terminal Console Extension: SIMBL + Visor iTerm 2
TextMate + Missing Drawer + Get Bundles + Rails + AckMate
jEdit + FTP + …
Git + GitX (Experimental)
FTP & Co: Cyberduck
Hudson status: CCMenu
Share Files: Dropbox
Google Chrome
Firefox + Firebug

Extended Development

Nice to have:
System Notification: Growl + Growl Mail
Read RSS: NetNewsWire Now using RSS within Apple Mail
IRC Client: Colloquy and hide join messages Adium
Skype and Tweetie original Twitter client
Control iTunes: SizzlingKeys Bowtie
Spotify and Spotify Menubar and more goddies iScrobbler
All Codecs: Perian
Dasboard widgets: IP + App Update
Copy&Paste History: Flycut
Track Work: MacTimeLog
Word replacement: iWork
Keep your Notes: Journler
Extend Finder: TotalFinder
Mail Archiver and other MailPlugins

Install hints
mac ports
sudo port selfupdate sudo port install git-core +svn +bash_completion sudo port install ImageMagick +no_x11 sudo port install wget

ruby gems
sudo gem self update sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config sudo gem install rails sudo gem install passenger sudo gem install piston

Safari open always in tabs:
defaults write TargetedClicksCreateTabs -bool true

Safari enable Development mode:
defaults write WebKitDeveloperExtras -bool true defaults write IncludeDebugMenu 1

Safari Plugins:

TextMate install bundle
cd ~/Desktop && svn co <>

Well, that’s it! Stay tuned for updated…

BCD3000 Djay Midi Mappings

April 02, 2010

Some while ago I bought this nice Midi Controller BCD3000 by Behringer. It’s an easy to use device which brings way more fun mixing your MP3. For easy party playing mode I very like Djay, which is a simple but very powerfull mixing software. It now support Midi devices as well!
Unfortunately I couldn’t find any predefined Midi Mappings for Djay and BCD3000. So I created my own. Please download the file here. For now, all basic features are mapped, I may add sophisticated ones soon. It’s hosted on github, so please fork it and add you changes.

Happy DJing!

Rainbow Cube - here it is!

March 08, 2010

Yay, I finally got my Rainbow Cube from Seeedstudio. It came in various parts which required happy soldering. Now, I can start experimenting and porting mtXcontrol to support Rainbow Cube as well - stay tuned!

My Rails Patch: reload on default scope - committed!

March 03, 2010

uiuiui, long time no read, as I’m quite busy lately. Just a quick update, my rails patch - fixing ‘reload’ on a AR with default scope - got finally committed - nice:

mtXcontrol meets Launchpad meets Rainbowduino

December 30, 2009

That’s it! I just released mtXcontrol version 1.1 with lot of updates and improvements. One major improvement is full support for Novation Launchpad: just draw your sequences and display them on your Launchpad! Even better, push the buttons to change the color, add, remove, copy & paste frames. For that mtXcontrol makes usage of the Launchpad Processing library which I released some days ago.

But Rainbowduino support improved as well. I fixed lots of bugs and implemented requested features. Now you can control the display brightness, save up to 10 frames onto the device and serial port is auto detected. In general, I defined an basic API to communicate with the devices, which allows you to add more devices easily (e.g. monome!). With that, all Rainbowduino stuff is moved in a separate Rainbowduino Processing library.

See official mtXcontrol project page for more.

Here it is: Launchpad Processing lib!

December 20, 2009

Yay, I finally released my Launchpad Processing Library. Please see it’s project page and source at github.

Videos & more are coming soon. (Yes, this includes an updated mtXcontrol Version with Launchpad support!!)

Hacking the Nabaztag

December 02, 2009

Alright, I spend some time with my new toy Nabaztag ‘Nabaccia

What confused me most: there have been two Firmware version out there. Some project depend on the old one, some other on the, new Jabber based, version.

Here are some interesting projects I’ve found: (outdated, MAC OS X) (PHP) (python) (windows only)

A working Proxyserver: jNabServer

A good summery how to start ‘nabazhacking’ is here:

A very detailed look into the electronics of the rabbit:

Forums: (french) (german) (english)

Blogs: (german)

Quite complete list of other sources:

GPG - up and running with Snow Leopard and

November 30, 2009

Ok, I finally managed to set up my GPG Mail System. Thanks to the latest version of GPGMail and gpg (1.4.10) (via macports sudo port install gnupg) it’s running fine and smooth again with Snow Leopard and Perfect!

See MacGPG and GPGMail for more…

Find my GPG-Key here

UPDATE: btw. to get GPGP work with gmail, check out FireGPG, a nice plugin for Firefox, which works perfect for me on Mac OS X. Unfortunately I haven’t found any Safari solution yet…

If your ruby serial port doesn't read what' you're sending...

November 27, 2009

Some days ago I got my Novation launchpad an immediately started hacking with some Ruby and Arduino flavor. I wanted to port ccb23 Raindrops Project to launchpad.

For that, I needed Serial communication within ruby. Thanks to ruby-serialport first steps went quite well. I could write OR read from and to Arduino easily. But for some reasons, writing AND reading using the same instance didn’t work out.

I used a simple ‘send-input-back’ sketch on the Arduino side. So every byte I’m sending is returned back. I checked with the Arduino IDE Serialmonitor and a simple Processing script - everything worked alright. But using ruby it was different. Writing to serial port worked okay, but reading from it was just random. Sometimes I read the response, sometime I didn’t - really, really weird. Some headaches and a lot of time testing I finally found the solution: just open two instances of the serial port. One for sending, one for reading - and, surprise, surprise - it works perfect! Who would have guessed that!? Strange..

// To be completed
require ‘serialport’
port_write =
port_read =

Ok, continuing hacking, more soon…

How to sync my mp3 Songs rating in iTunes across multiple Libraries

November 24, 2009

By now, I havn’t find any good solution to share my mp3 across multiple systems and disks. I’ve some on my local machine, some at work and some on my external harddisk to archive. Luckily, when copying my tracks to another library duplicates are ignored. But what annoys me most is that my ratings don’t get copied, as iTunes doesn’t store it within the file. Some while ago I found a solution by storing the number of stars into the ‘Grouping’ Field, so I can recover the rating afterwards. Now, I came up with this little applescript do automate the write and recover process. Just run this script, copy you mp3 to the other library, run the script again, and voilá, you ratings are back - nice!

(* small apple script to save rating into grouping field and
vice versa. Perfect to persitent store your rating witin the file

tell application “iTunes”
repeat with stars from 1 to 5
set rating_value to stars * 20
set group_name to “” & stars & “ Stars”

set sel to (every track whose rating is rating_value and grouping is “”)
repeat with aTrack in sel
tell aTrack
set grouping to group_name
end tell
end repeat

set sel to (every track whose rating is 0 and grouping is group_name)
repeat with aTrack in sel
tell aTrack
set rating to rating_value
end tell
end repeat
end repeat
end tell

Btw. for each Star rating I do have a smart playlist which allows me to find those quickly.

Ruby: a nice way to get name of current method you're in:

November 16, 2009

This is a nice extension to get the name of the method you’re currently in (Ruby < 1.9)

module Kernel
def this_method
caller[0] =~ /`([^’]*)’/ and $1

for Ruby >= 1.9 you can uses this:

module Kernel
def this_method

[see Stack Over Flow as well]

Lot's of Ruby and Rails Tricks

November 12, 2009

Quick, short post I always had in the queue:

Check this out, here some lists of good techniques to get started and to impove your Ruby and Rails code:

[Awsm picture taken from DesignShark]

Orangutan Robot Controller

October 29, 2009

Ui, I just stumbled over the Orangutan Robot Controller. Funny, as it’s name is similar to this blogs name ;-) - to bad is has discontinued