Skip to content

Instantly share code, notes, and snippets.

@boecko
boecko / gist:943975
Created April 27, 2011 09:28
JSON Decoding on cmdline (ruby)
curl url | ruby -e "require 'rubygems'; require 'json'; puts JSON.pretty_generate(JSON[STDIN.read]);"
cat file | ruby -e "require 'rubygems'; require 'json'; puts JSON[STDIN.read]['serverStatus']['uptime'];"
@boecko
boecko / gist:943941
Created April 27, 2011 08:46
JSON Decoding on cmdline
curl url | python -mjson.tool
@boecko
boecko / ssh-host-gen
Created March 23, 2011 16:54
Host key generation
ssh-keygen -t dsa -N '' -f ssh_host_dsa_key
ssh-keygen -t rsa -N '' -f ssh_host_rsa_key
@boecko
boecko / grep hex
Created March 22, 2011 18:56
grep for 0xc3 in files
grep -e $'\xC3' *