Skip to content

Instantly share code, notes, and snippets.

View davidguttman's full-sized avatar

David Guttman davidguttman

View GitHub Profile
@davidguttman
davidguttman / index.js
Created May 21, 2017 08:16
requirebin sketch
var Delaunator = require('delaunator')
var SPEED = 0.20
var N_POINTS = 550
var width = window.innerWidth
var height = window.innerHeight
document.body.style.background = 'rgb(20, 20, 20)'
@davidguttman
davidguttman / LICENSE.txt
Created April 25, 2017 21:59 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@davidguttman
davidguttman / nightmare-on-amazon-linux.MD
Created April 1, 2017 19:43 — forked from dimkir/nightmare-on-amazon-linux.MD
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
@davidguttman
davidguttman / nightmare-on-amazon-linux.MD
Created April 1, 2017 19:43 — forked from dimkir/nightmare-on-amazon-linux.MD
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
#Sample circle.yml for deploying a rails app to deis
machine:
pre:
# install the deis cli
- curl -sSL http://deis.io/deis-cli/install-v2.sh | bash
- sudo mv $PWD/deis /usr/local/bin/deis
deployment:
staging:
branch: master
commands:
@davidguttman
davidguttman / slate.js
Created December 4, 2016 00:38
slate js config
slate.config('defaultToCurrentScreen', true)
slate.bind('up:cmd;ctrl;alt', screenify(topCenter))
slate.bind('down:cmd;ctrl;alt', screenify(bottomCenter))
slate.bind('left:ctrl;alt;shift', screenify(topLeft))
slate.bind('up:ctrl;alt;shift', screenify(topRight))
slate.bind('right:ctrl;alt;shift', screenify(bottomRight))
slate.bind('down:ctrl;alt;shift', screenify(bottomLeft))
slate.bind('left:cmd;ctrl;alt', screenify(left))
# Rebind to Ctrl-a
set -g prefix C-a
unbind C-b
bind a send-prefix
bind C-a last-window
bind '"' choose-window
# Rebind pane splitting
unbind %
bind - split-window -v
From b449231011d1400ea8fd18b881c53289e501feeb Mon Sep 17 00:00:00 2001
From: David Guttman <david@davidguttman.com>
Date: Wed, 31 Aug 2016 09:17:46 -0700
Subject: [PATCH] forms: ensure fields clear on submit + tests
---
manuscript/code/forms/06-state-input-multi.jsx | 4 ++--
manuscript/code/forms/07-basic-validation.jsx | 4 ++--
manuscript/code/forms/08-field-component-field.jsx | 2 +-
manuscript/code/forms/package.json | 3 ++-
@davidguttman
davidguttman / index.js
Created August 25, 2016 18:27
requirebin sketch
var lerp = require('lerp')
var ease = require('ease-component')
var createLoop = require('canvas-loop')
var createContext = require('2d-context')
var ctx = createContext()
var canvas = ctx.canvas
var app = createLoop(canvas)
app.start()

Keybase proof

I hereby claim:

  • I am davidguttman on github.
  • I am dguttman (https://keybase.io/dguttman) on keybase.
  • I have a public key ASApa8H7gCZtcrMlXb5vZx-nxiOe3SUs5P12QMtG6DZJ7Ao

To claim this, I am signing this object: