Skip to content

Instantly share code, notes, and snippets.

/**
* This is a simple example of how to use the Keystone library.
*
* To use this example in the real world, you need a projector
* and a surface you want to project your Processing sketch onto.
*
* Simply drag the corners of the CornerPinSurface so that they
* match the physical surface's corners. The result will be an
* undistorted projection, regardless of projector position or
* orientation.
@adenine
adenine / gist:2503536
Created April 26, 2012 22:00
Quick Maker sketch
import com.rockwellgroup.lab.processingecs.*; // import the processingECS library
ProcessingECS pECS; // create a new object - see docs at http://www.ecsTBD.com for more info
/**
* Maker Faire building sketch
* This controls a set of 4 window outputs and reads from 4 inputs
*/
boolean swapColor = false;
boolean[] outputs = new boolean[4];
@adenine
adenine / gist:2223408
Created March 28, 2012 03:42
ecs.js
// BIND FIX FOR OLDER BROWSERS
if( Function.prototype.bind ) {
} else {
/** safari, why you no bind!? */
Function.prototype.bind = function (bind) {
var self = this;
return function () {
var args = Array.prototype.slice.call(arguments);
return self.apply(bind || null, args);
};
@adenine
adenine / gist:2223404
Created March 28, 2012 03:41
labreset.css
/* reset css */
html{ color:#000;background:#FFF;margin:0;padding:0;border:0;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;border:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}del,ins{text-decoration:none;}a{outline:none;}
@adenine
adenine / ajaxrefresh.html
Created April 23, 2011 23:14
Basic Ajax Page Refresh
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<meta name="author" content="Joshua Walton LAB">
<!-- Date: 2011-04-20 -->
</head>
@adenine
adenine / app.js
Created April 23, 2011 23:09
Node.js Hello World Web Server
var http = require('http');
var server = http.createServer(function(req, res) {
res.writeHead(200, {
'Content-type': 'text/plain'
});
res.end('Hello World');
});
server.listen(8000, "127.0.0.1");
// DOT EXERCISE
// THISNEWMEDIA.TUMBLR.COM
float yPos;
int myHeight = 800;
int myWidth = 400;
float speed = 0;
float gravity = 0.1;
void setup() {