Skip to content

Instantly share code, notes, and snippets.

View sfentress's full-sized avatar

Sam Fentress sfentress

  • Concord Consortium
View GitHub Profile
/*
Fade
This example shows how to fade an LED on pin 9
using the analogWrite() function.
This example code is in the public domain.
*/
int brightness = 0; // how bright the LED is
/*
AnalogReadSerial
Reads an analog input on pin A0, prints the result to the serial monitor
This example code is in the public domain.
*/
int pin = A0;
void setup() {
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_29" class="java.beans.XMLDecoder">
<object id="Element0" class="org.concord.mw2d.models.Element">
<void property="mass">
<double>0.16666666666666666</double>
</void>
<void property="sigma">
<double>7.0</double>
</void>
</object>
$ ./script/gh-pages.sh
remote: Counting objects: 303, done.
remote: Compressing objects: 100% (172/172), done.
remote: Total 248 (delta 182), reused 134 (delta 68)
Receiving objects: 100% (248/248), 41.88 KiB, done.
Resolving deltas: 100% (182/182), completed with 45 local objects.
From github.com:concord-consortium/lab
4b6c277..01d3c22 gh-pages -> origin/gh-pages
b4b018a..10f47ea master -> origin/master
@sfentress
sfentress / dgApi.js
Created May 21, 2012 18:11
Arduino Data
// [KCPT]
// The dgApi object contains everything needed to communicate back to the DG application.
dgApi = {};
// For now we go through 'DG.currGameController.doCommand'.
// Very shortly a development branch will be merged to the trunk
// which simplifies that to 'DG.doCommand'.
dgApi.gameController = window.parent.DG.currGameController;
dgApi.doCommand = dgApi.gameController && dgApi.gameController.doCommand;
@sfentress
sfentress / dgApi.js
Created May 21, 2012 19:41
Arduino Data with Generic dgApi
// [KCPT]
// The dgApi object contains everything needed to communicate back to the DG application.
dgApi = {};
// For now we go through 'DG.currGameController.doCommand'.
// Very shortly a development branch will be merged to the trunk
// which simplifies that to 'DG.doCommand'.
dgApi.gameController = window.parent.DG.currGameController;
dgApi.doCommand = dgApi.gameController && dgApi.gameController.doCommand;
@sfentress
sfentress / classlist-shim-for-ie.js
Created May 21, 2012 19:53 — forked from stepheneb/README.md
NetLogo Data for DG, using generic dgApi
/*
* Minimal classList shim for IE 9
* By Devon Govett
* MIT LICENSE
*/
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
@sfentress
sfentress / two-atoms-two-elements.json
Created May 30, 2012 14:33
Two atoms different elements
{
"temperature_control": false,
"epsilon": -0.4000000059604645,
"sigma": 0.14,
"lennard_jones_forces": true,
"coulomb_forces": false,
"width": 4.5,
"height": 3,
"atoms": {
"X": [
@sfentress
sfentress / gist:3137964
Created July 18, 2012 18:38
Error pushing couchapp
On Mac OS X 10.6.8:
$ curl -O http://python-distribute.org/distribute_setup.py
$ sudo python distribute_setup.py
$ sudo easy_install pip
$ sudo pip install couchapp
$ sudo pip install --upgrade couchapp
$ couchapp --version
Couchapp (version 1.0.1)