Skip to content

Instantly share code, notes, and snippets.

@chewbranca
Created July 24, 2011 17:32
Show Gist options
  • Save chewbranca/1102858 to your computer and use it in GitHub Desktop.
Save chewbranca/1102858 to your computer and use it in GitHub Desktop.
dbquick.sh
#!/bin/sh
url="$(echo -n $1 | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg')"
host="http://databook.chewbranca.com"
request="/api/v1/quick_post"
api_key="API_KEY"
CURL=`which curl`
$CURL -X GET "${host}$request?a=$api_key&u=$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment