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
Last active May 22, 2017 03:27
requirebin sketch
var Delaunator = require('delaunator')
var Simplex = require('perlin-simplex')
var simplex = new Simplex()
var SPEED = 0.25
var N_POINTS = 150
var width = 0.75 * window.innerWidth
var height = 0.75 * window.innerHeight
@davidguttman
davidguttman / index.js
Created May 21, 2017 16:33
requirebin sketch
var Delaunator = require('delaunator')
var Simplex = require('perlin-simplex')
var simplex = new Simplex()
var SPEED = 0.5
var N_POINTS = 200
var width = 0.75 * window.innerWidth
var height = 0.75 * window.innerHeight
@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
@davidguttman
davidguttman / deploy_rails_app_on_ubuntu.md
Created October 18, 2011 06:11 — forked from he9lin/deploy_rails_app_on_ubuntu.md
Setup Rails application production environment on Ubuntu

Setup Rails application production environment on Ubuntu

Add deploy user

ssh root@YOURDOMAIN
adduser deploy
visudo # Add deploy ALL=(ALL) ALL

Install necessary libraries