Skip to content

Instantly share code, notes, and snippets.

@benstein
Created March 24, 2009 10:56
Show Gist options
  • Save benstein/84033 to your computer and use it in GitHub Desktop.
Save benstein/84033 to your computer and use it in GitHub Desktop.
#!/bin/bash
USERNAME=''
PASSWORD=''
TWITTER_URL="http://twitter.com/statuses/update.json"
IP_URL="http://www.whatismyip.com/automation/n09230945.asp"
IP="`curl -s $IP_URL`"
GEO_URL="http://api.hostip.info/get_html.php?ip=$IP&position=true"
LOCATION="`curl -s $GEO_URL`"
STATUS="($IP) $LOCATION"
curl -u $USERNAME:$PASSWORD -d status="$STATUS" $TWITTER_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment