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
#define LED 13 | |
void setup() { | |
pinMode(LED, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(LED, HIGH); | |
delay(1000); | |
digitalWrite(LED, LOW); |
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
#define LED 13 | |
#define BUTTON 7 | |
int val = 0; | |
void setup() { | |
pinMode(LED, OUTPUT); | |
pinMode(BUTTON, INPUT); | |
} |
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
#include "App.h" | |
void | |
App::setup() { | |
connected = tcpClient.setup("127.0.0.1", 11999); | |
connectedTime = 0; | |
deltaTime = 0; | |
tcpClient.setVerbose(true); |
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
# On deploy/production branch to deploy production stage. | |
task :deploy do | |
branch = `git branch`.match(/\* (.+)/).to_s.split('/') | |
if branch.count < 2 or branch[0] != 'deploy' | |
return | |
end | |
stage = branch[1] | |
sh "cap #{stage} deploy" | |
end |
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
export NODE_VERSION=0.6.12 | |
export NAVE=$NODE_VERSION | |
export NAVEVERSION=$NODE_VERSION | |
export NAVE_DIR=~/.nave | |
export NAVE_ROOT=$NAVE_DIR/installed | |
export npm_config_binroot=$NAVE_ROOT/$NAVEVERSION/bin | |
export PATH=$NAVE_ROOT/$NAVEVERSION/bin:$PATH | |
export npm_config_manroot=$NAVE_ROOT/$NAVEVERSION/share/man | |
export NODE_PATH=$NAVE_ROOT/$NAVEVERSION/lib/node |
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 = require('canvas') | |
, q = require('qcanver') | |
, fs = require('fs') | |
, canvas = new Canvas(1000, 1000) | |
, out = fs.createWriteStream(__dirname + '/output.png'); | |
q(canvas) | |
.begin(50, 10) | |
.line(10, 75) | |
.line(90, 75) |
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
#include "testApp.h" | |
#define MAX_NUM 1000 | |
ofPoint points[MAX_NUM]; | |
ofPoint direction[MAX_NUM]; | |
float rad[MAX_NUM]; | |
ofColor colors[MAX_NUM]; | |
//-------------------------------------------------------------- |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
ofBackground(0, 0, 0); | |
ofEnableAlphaBlending(); | |
ofEnableSmoothing(); | |
ofSetFrameRate(30); | |
ofSetVerticalSync(true); | |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, stylus = require('stylus') | |
, normalize = require('normalize'); | |
var app = module.exports = express.createServer(); |
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
request('http://example.org/foo.png', function(err, res, body) { | |
// body is broken... | |
}); |