This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Here is a spike of a lightweight in-process pubsub mechanism that allows pure ;; functional consumers, both blocking and asynchronous. | |
;; This defines the event stream, in this case just a series of numbers, | |
;; a new one produced each second | |
(defn timer [] | |
(lazy-seq | |
(do | |
(Thread/sleep 1000) | |
(cons (System/nanoTime) (timer))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//namespace names this object. | |
namespace blaine | |
{ | |
class helloworld | |
{ | |
//Every program starts with a Main method. | |
//Static indicates that you can access this method without having an object of your class available. | |
//void indicates to the compiler that your method will not return a value to the calling method. | |
static void Main() | |
{ |