Skip to content

Seriality - Physicality for the Web

January 23, 2013

Here a very late shout out to an interesting project: control your Arduino via the browser! Basically its a browser plugin to get access to your machines (virtual) serial port. With that you can use javascript to send and receive any data - how cool is that!?

When 'return' matters

December 19, 2012

so return actually makes difference in some cases!

def mystery_number
  return 23

def mystery_number2
  return 23
  return 42

puts mystery_number  # -> 23
puts mystery_number2 # -> 42

Carambola Board arrived

November 28, 2012

Yay the Carambola Board arrived today from Exp Tech. Time to start hacking!!

Good place to start with:

To start with:

Transistor vs. MOSFet - According to Pete

November 14, 2012

oh yeah, I guess I finally got the basic difference between a Transistor and a MOSFET:

Transistor is current driven, a MOSFET via voltage! Thanks to Pete, and his fabulous SparkFun screencasts:

yieha! Watch ‘em all:

Send Mac to sleep with external screen and closing the lid (Yosemite)

October 17, 2012

I had the problem of my Mac not going into sleep when external screen is connected and closing the lid. Luckly I came across this advice which indeed, did the trick:

  1. Disable external Monitor
  2. Type sudo nvram boot-args="iog=0x0"
  3. and restart


Update : With Yosemite you need to type:

sudo nvram boot-args="niog=1"


MySQL Hack: Hide unwanted variable declaration

October 17, 2012

Little MySQL to hide a unwanted variable declaration:


@l:="tempvalue" AS unwanted_output,
"actual output" AS ouput,
@l AS position;

Solution - ‘hide’ the var assignment within a Wrap variable inside a IFdefenition:

IF(@l:="tempvalue", "actual output", "dummy") AS ouput,
@l AS position;

Ruby Curly braces

July 24, 2012

In ruby curly braces have different meanings:

1. A hash:

my_hash = {:a => 1, :b => 2}

or the same but more JSON like syntax ( ruby >= 1.9 only)

my_hash = {a:1, b:2}

same as:

my_hash =
my_hash[:a] = 1
my_hash[:b] = 2

2. A block:

in rough and short: a block is a piece of code which will/can be executed either ‘later in time’ or ‘in a different context’

3.times do
 puts "HI"


3.times {
 puts "HI"

especially in one line it reads nice:

3.times { puts "HI" }

usually blocks have parameters which allows them easily to be identified:

  3.times { |index| puts "Loop: #{index}" }

oh and here’s a third case:

3. curly braces us variable within a string_

name = "Heinz"
puts "#{name} Ketchup is toll"

same as

name = "Heinz"
puts name + " Ketchup is toll"

I hope this helps to understand. I have to admit, curley braces have lots of different meanings in ruby and are indeed confusing - quite often they are ‘shortcuts’ to make your code read nice.

Hack your whiteboard - and clean it quick!

July 13, 2012

For the record: Here’s my favorite realworld hack I got once told by my lovley coworker Roel:

How to clean a messy whiteboard.

Remember the situation when one used the wrong pen for the whiteboard and can’t clean it? Just take another pen which can be erased and go over the non erasable parts - suddenly everything gets clean away:

Or in the words of TvLesson:
Take another dry erase marker (preferably darker than the marks that you are trying to remove) and draw on top of the messy marks. Then wipe the marks away with a dry erase eraser or soft cloth.

The new layer of dry erase marker will lift and loosen the underlying marks. It’s simple but may not work for tougher messy marks.

CSS div State

June 22, 2012

Example code for multiple FE state toggled via CSS classes only


<div id="state" class="pending">
  <div id="pending">Pending</div>
  <div id="success">Successful</div>
  <div id="fail">Failed</div>

#state div {
  display: none;

#state.pending #pending  {
  display: block;

#state.success #success {
  display: block;
} #fail {
  display: block;

#state.debug div {
  display: block;



Rspec - Useful How To and Best Practices

June 21, 2012

Here are two *very* good update-to-date sources of Rspec howtos and best practices:

The first on by Andrea Reginato(@lelylan) gives a very good overview. Start here:

The second one by Jeff Pollard features ninja-kick-ass shared spec examples:

Andrea did already a good job with the Google Doc, but what about collection all tipps into git repo so everyone can easily collaborate - let’s fork, PR and drive it forward!

More sources to follow - spec it, run it, kick it!

[kind of unrelated but nice picture ‘borrowed’ from global nerdy]

Lego Sumo Robot - Team SoundCloud

March 14, 2012

Uh, long, long time ago, (aka. last year autumn) I’ve been to GoTo Conference 2011 in Århus to present SoundCloud. For the evening program, a Lego Mindstorm Sumo fight was organized which, for sure, we couldn’t miss. Watch our sweet robot in action -
the first round of the sumo battle, where Team SoundCloud flips over the opponent!

Unfortunately that was already it’s glorious time - we dropped out for the second round. Anyway - it was big-huge-massive fun. Make sure you grab some lego bricks and build your own.

In case you’re interested in the code, it wasn’t much and nothing to be proud of - but worked!

DelJect - delete & eject USB card easily

March 09, 2012

Here’s another little AppleScript I recently wrote:

DelJect - an AppleScript to delete and eject any external Cards/USB Stick

A friend asked for this little script: His problem was, that his photography camera couldn’t deal with apple’s hidden files like.DS_STORE etc. To workaorund that, he had to delete those files each time before ejecting. DelJect automates this manual process. Voila!

Download the latest version here:

Just run the binary, select the device (USB stick), confirm delete and unplug the stick. Done!

As a litte gotcha, DelJect will remeber the device - so next time, just confirm & go.

Thanks to Niels for the idea and thanks Icon-Land for Icon.

Hacking the Nabaztag - Arduino injects via I2C data into RFID Reader

January 10, 2012

Wow! After more than two years I finally got my hands dirty hacking the Nabaztag rabbit. The release of the source code last summer were very encouraging here! Expect some awesome results in the next time :-)

Let’s start with NabaztagInjector , an Arduino Library to inject data:

What bothered me for long was the missing possibility to connect external devices to the rabbit. How awesome would it be to use the rabbit for sending data into the net? Imagine it as WIFI shield you Arduino.

Guess what - that’s possible: replacing the RFID reader with an Arduino (both use the I2C bus) running a simulation of the RFID reader chip, enabled me to inject any custom data to the rabbit. Hacked!

As result, I created this tiny Arduino library to encapsulates the full process behind and easy API:

[gist id=1582447]

Check out the full Readme, Source code and Examples here:

Big Sitemaps are Big - Google Sitemaps at SoundCloud

January 09, 2012

Big Sitemaps are Big - Google Sitemaps at SoundCloud Hack and Tell @Cbase Sept’11

Me speaking about Sitemaps at SoundCloud and presenting the big_sitemaps gem to handle to load easily.

Sugru rocks! Or: how I fixed my broken iPhone Display glass from falling off.

November 08, 2011

Unfortunately I kept on dropping my iPhone until its display glass broke. Typical me. But after that, even worse, the little bits of broken glass where loose, slowly felt off one after another destroying the displays protection completely. Whereas the drop (besides the broken glass) didn’t effect the phones functionaries at all (even its touch capabilities are 100% working), the vanishing glass revealed the display which could get destroyed by dust and moist easily. Luckily I found a solution: Sugru.

Sugru is this fantastic super modeling clay made by Jane from Ireland. It allows you to hack the world and fix stuff. First its soft, sticks on nearly and material allowing you to put it in any shape, later it hardens and keeps its form. Perfect for me!

Check my hack, where I used Sugru replacing the missing glass pieces and preventing the loose ones from falling of. My display is protected again, and the phone is working - yay!

Visit the Sugru Website and get some for yourself: