Skip to content

Instantly share code, notes, and snippets.

@johnschimmel
johnschimmel / hand.pde
Created October 5, 2011 13:40
Hand with Red Dot
/* --------------------------------------------------------------------------
* SimpleOpenNI Hands3d Test
* --------------------------------------------------------------------------
* Processing Wrapper for the OpenNI/Kinect library
* http://code.google.com/p/simple-openni
* --------------------------------------------------------------------------
* prog: Max Rheiner / Interaction Design / zhdk / http://iad.zhdk.ch/
* date: 02/27/2011 (m/d/y)
* ----------------------------------------------------------------------------
* This demos shows how to use the gesture/hand generator.
@johnschimmel
johnschimmel / pubnub-chat.html
Created November 16, 2011 01:48
Telepresence Change color annoy your friends
<html>
<head></head>
<body>
<div><input id=input placeholder=you-chat-here /></div>
<div id="box"></div>
<!--
UPDATE pub-key and sub-key with your info from pubnub
-->
@johnschimmel
johnschimmel / gist:1941724
Created February 29, 2012 15:36
Developing locally and deploying NodeJS on Heroku

Initial NodeJS setup

with heroku toolbelt installed run following in code directory (via Terminal)

npm install
git init
git add .
git commit -am "initial commit"
foreman start
@johnschimmel
johnschimmel / gist:2079811
Created March 18, 2012 18:58
displayAll.html
<!doctype html>
<html>
<body>
<h1 class="page-header">
Cab.ly
</h1>
<h2>
Driver Information
</h2>
@johnschimmel
johnschimmel / web.js
Created April 7, 2012 11:26
passport-foursquare setup with Mongoose
var express = require('express');
var ejs = require('ejs'); //embedded javascript template engine
var app = express.createServer(express.logger());
var mongoose = require('mongoose'); // include Mongoose MongoDB library
var schema = mongoose.Schema;
var requestURL = require('request');
//include passport-foursquare
var passport = require('passport')
, util = require('util')
@johnschimmel
johnschimmel / trackTime.js
Created April 25, 2012 20:59
track your time or get detention
var doSomethingForClient = function() {
// do something here
trackTime();
}
var trackTime = function() {
console.log("tracking my time!");
trackTime();
}
@johnschimmel
johnschimmel / olya_loops.js
Created May 1, 2012 12:04
Nested for loop example
<!-- Loop through each state, 's' is the incrementer value -->
<% for(s=0;s< states.length; s++) %>
<h4><%=states[s].toUpperCase()%></h4>
<UL>
<!-- Loop through allLegs for the current state, state[s] -->
<% for(i=0; i<allLegs[states[s]].length; i++) {%>
<li><%= allLegs[states[s]][i].title %></li>
/* Simple USB Keyboard Example
Teensy becomes a USB keyboard and types characters
REQUIREMENTS - Install the Teensyduino (arduino ide plugins)
http://www.pjrc.com/teensy/td_download.html
Before programming you must select Keyboard from the "Tools > USB Type" menu
This example code is in the public domain.
*/
@johnschimmel
johnschimmel / simplekeyboard-example
Created August 4, 2012 15:22
SimpleKeyboard for Arduino Leonardo
/*
Keyboard Button test
Sends a text string when a button is pressed.
The circuit:
* pushbutton attached from pin 2 to +5V
* 10-kilohm resistor attached from pin 4 to ground
created 24 Oct 2011
@johnschimmel
johnschimmel / gist:3603162
Created September 2, 2012 18:58
installing python 2.7.x
Installing Python 2.7.x
https://gist.github.com/3603162
***********************************************
Installing Python Setuptools
1) Download Python Setuptools
http://pypi.python.org/pypi/setuptools#downloads