This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fit = require('canvas-fit'); | |
var ctx = document.body.appendChild(document.createElement('canvas')).getContext('2d'); | |
window.addEventListener('resize', fit(ctx.canvas, window), false); | |
!function() { | |
function Circle (x, y) { | |
this.px = x; | |
this.py = y; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fit = require('canvas-fit'); | |
var ctx = document.body.appendChild(document.createElement('canvas')).getContext('2d'); | |
window.addEventListener('resize', fit(ctx.canvas, window), false); | |
var particles = []; | |
var PARTICLES_COUNT = 100; | |
var PARTICLE_SIZE = 5; | |
var PARTICLE_MAX_SPEED = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fit = require('canvas-fit'); | |
var ctx = document.body.appendChild(document.createElement('canvas')).getContext('2d'); | |
window.addEventListener('resize', fit(ctx.canvas, window), false); | |
var particles = []; | |
var PARTICLES_COUNT = 100; | |
var PARTICLE_SIZE = 5; | |
var PARTICLE_MAX_SPEED = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fit = require('canvas-fit'); | |
var pressed = require('key-pressed'); | |
var collide = require('box-collide'); | |
var clamp = require('clamp'); | |
var ctx = document.querySelector('#c').getContext('2d'); | |
window.addEventListener('resize', fit(ctx.canvas), false); | |
var entities = []; | |
var systems = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <PORT>"; | |
return 1; | |
fi | |
PID=$(lsof -i :$1 | tr -s ' ' | cut -d ' ' -f 2 | sed -n 2p) | |
if [ -z "$PID" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//client | |
var l = require('hyperquest')({ | |
method: 'post', | |
uri: 'http://localhost:9983', | |
withCredentials: false | |
}) | |
l.on('data', function(a){console.log(a.toString())}) | |
l.on('error', console.log) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.body.appendChild(document.createElement('canvas')); | |
var ctx = canvas.getContext('2d'); | |
var fit = require('canvas-fit'); | |
window.addEventListener('resize', fit(canvas)); | |
var MAX_ENTITIES = 10; | |
var entities = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot | |
i am groot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# compile brainf*ck to groot | |
# "+" "i am groot" | |
# "-" "I am Groot" | |
# "." "I AM GROOOT" | |
# ">" "I AM GROOT" | |
# "<" "I am groot" | |
# "," "I am grooot" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var knob = require('dom-knob') | |
var elem = document.body.appendChild(document.createElement('div')) | |
elem.style.background = 'red' | |
elem.style.padding = '100px' | |
elem.style.fontSize = '30px' | |
knob(elem, function(deg) { | |
elem.innerHTML = deg |
NewerOlder