Skip to content

Instantly share code, notes, and snippets.

@Gooseus
Gooseus / 0_reuse_code.js
Last active August 29, 2015 14:14
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
@Gooseus
Gooseus / s3_get_bucket_obj.nim
Last active October 25, 2017 06:57 — forked from Varriount/s3_get_bucket_obj.nim
Testing async dispatch and http requests in Nim
# 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/"
@Gooseus
Gooseus / aws_example.nim
Created October 27, 2017 01:08 — forked from Varriount/aws_example.nim
Nim AWS Snippets
# 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 *************