Skip to content

Instantly share code, notes, and snippets.

View huricool's full-sized avatar

Sean Park huricool

View GitHub Profile
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@huricool
huricool / git-rsync.sh
Created February 29, 2016 02:50 — forked from paydro/git-rsync.sh
rsync changed files in a git repo to a remote server
git status -s | awk '{print $2}' | sed 's/\(.*\)/rsync -cav \1 user@remote.server.com:~\/\1/' | sh