Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created September 25, 2009 03:40
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 voxxit/193276 to your computer and use it in GitHub Desktop.
Save voxxit/193276 to your computer and use it in GitHub Desktop.
def gethostname(domain)
Socket.getaddrinfo(domain, nil)[0][2]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment