Skip to content

Instantly share code, notes, and snippets.

David Guttman davidguttman

Block or report user

Report or block davidguttman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidguttman
davidguttman / index.js
Created May 21, 2017
requirebin sketch
View index.js
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 Apr 25, 2017 — forked from jed/LICENSE.txt
generate random UUIDs
View LICENSE.txt
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
View nightmare-on-amazon-linux.MD

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
View nightmare-on-amazon-linux.MD

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
View deis-circle.yaml
#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:
View slate.js
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))
View tmux.conf
# 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
View form-clear.diff
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 Aug 25, 2016
requirebin sketch
View index.js
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()
View keybase.md

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:

You can’t perform that action at this time.