Skip to content

Instantly share code, notes, and snippets.

View sjoonk's full-sized avatar

Sukjoon Kim sjoonk

View GitHub Profile
## convert HTML POST data to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#set($rawAPIData = $input.path('$'))
## first we get the number of "&" in the string, this tells us if there is more than one key value pair
#set($countAmpersands = $rawAPIData.length() - $rawAPIData.replace("&", "").length())
## if there are no "&" at all then we have only one key value pair.
## we append an ampersand to the string so that we can tokenise it the same way as multiple kv pairs.
@sjoonk
sjoonk / 0_reuse_code.js
Created November 29, 2013 05:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sjoonk
sjoonk / self_signed_cert.rb
Created January 19, 2012 14:50 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
We couldn’t find that file to show.