Skip to content

Instantly share code, notes, and snippets.

const AWS = require('aws-sdk');
const fs = require('fs');
const mime = require('mime-types')
const path = require("path");
// Base AWS config.
// AWS Reference: Make sure the profile exists in ~/.aws/credentials
// See managing access keys:
// https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console
@toymakerlabs
toymakerlabs / 0_reuse_code.js
Created August 31, 2017 22:35
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
import time,datetime,csv
#http://stackoverflow.com/questions/15578331/save-list-of-ordered-tuples-as-csv
#fake set of events. This might come from a sensor later on
events = ["event1","event2","event3","event4","event5"]
import time,datetime,csv
#http://stackoverflow.com/questions/15578331/save-list-of-ordered-tuples-as-csv
#fake set of events. This might come from a sensor later on
events = ["event1","event2","event3","event4","event5"]
@toymakerlabs
toymakerlabs / animationTest.js
Created November 28, 2016 16:20
Comparison of refactored Functional wrapper for requestAnimationFrame
/* FP
const loopy = (start_time,duration,onEnterFrame) => {
window.requestAnimationFrame((timestamp)=>{
if(start_time === 0) start_time = timestamp; //only true the first run through
//const step = getStep(timestamp,start_time,duration)
//console.log(timestamp-last_time)
//const delta = Math.min(timestamp-last_time,17)