Created
March 3, 2011 05:13
-
-
Save grauwoelfchen/852366 to your computer and use it in GitHub Desktop.
This is simple checker of current ip address.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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