Last active
March 15, 2019 02:47
-
-
Save MauroEldritch/bbb8dfb8a5d38e807d15a306798cf207 to your computer and use it in GitHub Desktop.
Obtener mi IP desde la terminal con Ruby
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/ruby | |
require 'socket' | |
puts UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment