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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# testing async dispatch in pursuit of an efficient async s3 interface | |
import os, times, math, httpclient, asyncdispatch, asyncfile | |
let t0 = epochTime() | |
proc dt() : float = | |
round(epochTime() - t0,6) | |
const aws_url = "http://localhost:1234/" |
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
# AWS Version 4 signing example | |
# EC2 API (DescribeRegions) | |
# See: http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html | |
# This version makes a GET request and passes the signature | |
# in the Authorization header. | |
import base64, httpclient, hmac, nimSHA2, os, times, strutils, httpcore | |
# ************* REQUEST VALUES ************* |