Skip to content

Instantly share code, notes, and snippets.

@gr33n7007h

gr33n7007h/gp.rb Secret

Last active November 6, 2019 23:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gr33n7007h/d041f4fbc08f0e065854bb180330c3ac to your computer and use it in GitHub Desktop.
Save gr33n7007h/d041f4fbc08f0e065854bb180330c3ac to your computer and use it in GitHub Desktop.
for gp
NETWORK_PROXY_NEEDED =
begin
Socket.tcp(TEST_HOST, 80, connect_timeout: 1)&.close
false
rescue Errno::ETIMEDOUT
true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment