Kasper Tidemann - human, developer, businessman, man of the world.
From our hands we give.

Month: October, 2012

Pretty-printing JSON in the terminal

If you’re reading this, chances are you’ve probably worked with JSON in the terminal before. A very common use-case is when dealing with NoSQL databases such as MongoDB or Riak. curl‘ing the database for a resource spits out JSON like so: curl -X GET http://localhost:8098/riak/users?keys=true {“props”:{“name”:”users”,”allow_mult”:false,”basic_quorum”:false,”big_vclock”:50,”chash_keyfun”:{“mod”:”riak_core_util”,”fun”:”chash_std_keyfun”},”dw”:”quorum”,”last_write_wins”:false,”linkfun”:{“mod”:”riak_kv_wm_link_walker”,”fun”:”mapreduce_linkfun”},”n_val”:3,”notfound_ok”:true,”old_vclock”:86400,”postcommit”:[],”pr”:0,”precommit”:[],”pw”:0,”r”:”quorum”,”rw”:”quorum”,”small_vclock”:50,”w”:”quorum”,”young_vclock”:20},”keys”:[“kt@meemo.io”,”cl@meemo.io”]} Unfortunately, that’s not too easily readable. This brings us […]

There is something magical about Firefox OS

I’m trying my best to keep up with the development of Firefox OS. It’s an exciting mobile operating system based on a Linux kernel that boots into a Gecko-based runtime engine. In the absense of downloading and running Firefox OS myself, articles such as There is something magical about Firefox OS by Rob Hawkes are […]

Representing objects in Ember Data

At the time of writing, Ember Data supports four attribute types, namely string, number, boolean, and date. If you wish to handle a nested object, you likely have to piece it out into a separate representation with a belongsTo on the parent. However, you can make use of the excellent transforms() function of Ember Data. […]

Kasper Tidemann