Inspect a website like a string in Ruby
1 2 unset -f inspect_url 3 4 function inspect_url() { 5 /usr/bin/curl -L -s --max-time 10 "${@}" | ruby -n -e 'p $_.to_s' 6 return 0 7 } 8 9 inspect_url http://www.ruby-forum.com
DZone Snippets > ntk > inspect
13473 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 2 unset -f inspect_url 3 4 function inspect_url() { 5 /usr/bin/curl -L -s --max-time 10 "${@}" | ruby -n -e 'p $_.to_s' 6 return 0 7 } 8 9 inspect_url http://www.ruby-forum.com