Skip to content

Instantly share code, notes, and snippets.

@Asimov4
Asimov4 / lambda-dynamo
Last active November 7, 2015 05:28 — forked from markusklems/lambda-dynamo
Short aws lambda sample program that puts an item into dynamodb
// create an IAM Lambda role with access to dynamodb
// Launch Lambda in the same region as your dynamodb region
// (here: us-east-1)
// dynamodb table with hash key = user and range key = datetime
console.log('Loading event');
var doc = require('dynamodb-doc');
var dynamodb = new doc.DynamoDB();
exports.handler = function(event, context) {
@Asimov4
Asimov4 / resume_after_next.md
Created February 17, 2014 03:39 — forked from mikedeboer/resume_after_next.md
Why to call resume() after next()

When we write Connect middlewares that contain async operations, it is good practice to 'pause' the HTTP request with the help of the Connect utility function. When the async operation has finished, the HTTP request is resumed again. Let's have a look at the documentation for this utility:

Pause `data` and `end` events on the given `obj`.
Middleware performing async tasks _should_ utilize
this utility (or similar), to re-emit data once
the async operation has completed, otherwise these
events may be lost.
// ==UserScript==
// @name Amazon Auto-Smile
// @namespace
// @version 0.1
// @description Automatically redirects all www.amazon.com URLs to their smile.amazon.com equivalent.
// @match http://www.amazon.com/*
// @match https://www.amazon.com/*
// @run-at document-start
// @copyright 2013
// ==/UserScript==
@Asimov4
Asimov4 / makehub
Created December 22, 2013 08:21 — forked from eldraelin/makehub
TURBO
# Title
TURBO
# Picture
media: http://oblikon.net/wp-content/uploads/turbo-course.jpg
# Objective
The world fastest snail
# Duration
10
# Age Group
all
@Asimov4
Asimov4 / makehub
Created December 9, 2013 01:02 — forked from stefania11/makehub
Moss oscilator
# Title
Moss oscilator
# Picture
media: http://s24.postimg.org/3pqmzrp5h/Screen_Shot_2013_11_30_at_2_26_50_AM.png
# Objective
Building a 'Mosscillator' - a mixture of moss and oscillator. By touching moss the organic structures of moss are decreasing conductivity and can be therefore used as pressure sensor. The touch of moss will control sounds and noises generated by an oscillator chip.This way we can make a moss symphony together, consisting of several Mosscillators created during the workshop
# Duration
40
# Age Group
all