Posts tagged with tip

The iOS-apps I rely on

I was asked by a colleague what iOS apps I use the most and what I think are the "must haves" on an iPhone. Since I like listing things I was happy to oblige.

my homescreen

There are plenty of these sort of lists available and I have to say, that most are completely useless to me. We all have different needs that are defined by our lifestyle, work, friends and interests. Making a list that would satisfy all is nearly impossible. In addition, I'd like to say this is just a list of apps I feel comfortable recommending. I mention the apps but I don't review them in detail. I'd need to do a separate post if I'd wanted to do proper review.

Read More...

Pretty Print JSON From Curl

This post is just a short tidbit, a tip how to pretty print JSON when using Curl.

The Solution

As an example, I'll request my latest post as JSON and pretty print it.

curl -H "Accept: application/json" http://hkionline.net/posts/latest | python -m json.tool

In the example, we first make a HTTP GET request with Curl. Additionally, I set Curl only to accept application/json. This way my site will produce json, not html which is the default. Then I pipe the result of the request to a python's json library. This approach should work as long as you have Curl and Python installed (as is the case with OS X and most *nix systems).

Read More...