Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 18 lines (16 sloc) 0.504 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/ruby
 
# Dropzone Destination Info
# Name: Public IP
# Description: Grabs your public IP via ifconfig.me curl API and pushes it to you clipboard.
# Events: Clicked
# Creator: Marcell Jusztin
# URL: http://www.marcelljusztin.com
# IconURL: http://www.marcelljusztin.com/images/myip.png

def clicked
  $dz.begin("Retrieving IP Address...")
  ip_server = IO.popen("curl ifconfig.me/ip")
  ip = ip_server.readlines
  ip_server.close
  $dz.finish("Public IP is on your clipboard")
  $dz.url(ip)
end
Something went wrong with that request. Please try again.