Programming Blog

Programming related articles.

curl tutorial with examples of usage

Curl is a linux utility that is used to make HTTP requests to a given url. It outputs HTTP response to standard output and is actually very easy to use. Here are some examples to show its usage...

Pretty printing JSON output in terminal

If you need to pretty print the json output of a terminal command (so you can inspect it more easily), you can use python's json module. I usually use it to pretty print the output of curl command. Here is an example

    curl | python -m json.tool

This utility can also be used to pretty print json files like following

    python -m json.tool minified.json > prettyprint.json

Django ORM performance tips - part 1

This blog post will be split into two part. After I finish part two, I will add a link at the bottom of this one. For both parts I will use a sample project with sqlite3 database. file for sample application is here...