Navigation Menu

Skip to content

Commit

Permalink
Adding json prettyprint.
Browse files Browse the repository at this point in the history
  • Loading branch information
samschmitz committed Jun 24, 2015
1 parent 42639e9 commit 7f99e44
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion site/content/posts/posts/computerese.html
Expand Up @@ -9,6 +9,8 @@
I work with computers a fair amount, so now and again want to keep track of things I've learned. I work with computers a fair amount, so now and again want to keep track of things I've learned.
{% endmark %} {% 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. 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> ssh -R <remote port>:localhost:<local port> sjacoby@ <remote server>
Expand All @@ -23,5 +25,15 @@


Your locahost page should now be available at `<my remote server>:<my remote port>`. Party on. 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 %} {% endblock %}

0 comments on commit 7f99e44

Please sign in to comment.