Skip to content

Instantly share code, notes, and snippets.

@MauroEldritch
Last active March 15, 2019 02:47
Show Gist options
  • Save MauroEldritch/bbb8dfb8a5d38e807d15a306798cf207 to your computer and use it in GitHub Desktop.
Save MauroEldritch/bbb8dfb8a5d38e807d15a306798cf207 to your computer and use it in GitHub Desktop.
Obtener mi IP desde la terminal con Ruby
#!/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