Skip to content

Instantly share code, notes, and snippets.

@grauwoelfchen
Created March 3, 2011 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grauwoelfchen/852366 to your computer and use it in GitHub Desktop.
Save grauwoelfchen/852366 to your computer and use it in GitHub Desktop.
This is simple checker of current ip address.
#!/usr/bin/env ruby
cmd = 'w3m'
if open("| which #{cmd} 2>/dev/null") {|f| f.gets}
system "w3m http://current-ip-address.heroku.com -dump | awk '{print $4}'"
else
puts "please install \"w3m\"."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment