Permalink
Browse files

Adding json prettyprint.

  • Loading branch information...
samschmitz committed Jun 24, 2015
1 parent 42639e9 commit 7f99e4468a5c692560135a2b4140e256c0afd5f7
Showing with 13 additions and 1 deletion.
  1. +13 −1 site/content/posts/posts/computerese.html
@@ -9,6 +9,8 @@
I work with computers a fair amount, so now and again want to keep track of things I've learned.
{% endmark %}
## Sharing your localhost dev server with the world
Say you've got a server running locally—and want to quickly it share it with the world? You need a remote server that you have ssh access to.
ssh -R <remote port>:localhost:<local port> sjacoby@ <remote server>
@@ -23,5 +25,15 @@
Your locahost page should now be available at `<my remote server>:<my remote port>`. Party on.
EpNCKPdAm9$yLY&Py&5g
## Pretty printing `json` responses,
You've got this little slice of sweetness.
python -m json.tool
And if you want to do it in Vim, go with:
:%!python -m json.tool
Credit to [Pascal Prect](https://pascalprecht.github.io/2014/07/10/pretty-print-json-in-vim/).
{% endblock %}

0 comments on commit 7f99e44

Please sign in to comment.