Skip to content

Instantly share code, notes, and snippets.

@gearnode
Created December 19, 2015 23:39
Show Gist options
  • Save gearnode/72e27e22606bc593b047 to your computer and use it in GitHub Desktop.
Save gearnode/72e27e22606bc593b047 to your computer and use it in GitHub Desktop.
# script
ruby -r json -e 'STDIN.each { |res| puts JSON.pretty_generate(JSON.parse(res)) }'
#usecase
curl -X GET "http://api.gearnode.com" | ruby -r json -e 'STDIN.each { |res| puts JSON.pretty_generate(JSON.parse(res)) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment