Skip to content

Instantly share code, notes, and snippets.

@nbqx
Created November 1, 2012 08:07
Show Gist options
  • Save nbqx/3992417 to your computer and use it in GitHub Desktop.
Save nbqx/3992417 to your computer and use it in GitHub Desktop.
%w(sinatra/base json pygments).each{|x| require x}
inp = ARGF.read
jsn = JSON.pretty_generate(JSON.parse inp)
Sinatra.new{ get("/"){ "<style>#{Pygments.css}</style>#{Pygments.highlight(jsn, :lexer => 'json')}" }}.run!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment