Skip to content

Instantly share code, notes, and snippets.

View kurtwheeler's full-sized avatar

Kurt Wheeler kurtwheeler

View GitHub Profile
@kurtwheeler
kurtwheeler / publishAmazonSNS.sh
Created September 13, 2013 17:58
This is a script which provides a command line interface for publishing notifications to Amazon SNS.
#!/bin/bash
#This script creates a command line tool to publish a notification to Amazon SNS.
#The second parameter to urllib.quote is very important here.
#It overrides the default ignore character set which is just '/'
#If the default is set then the strings will not be url encoded to
#Amazon's requirements.
function urlencode {
python -c "import urllib; print urllib.quote('''$1''', '')"
}