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
# add headers | |
$ echo ‘#include “Arduino.h”’ > blink.cpp | |
# add sketch | |
$ cat blink.ino >> blink.cpp | |
# add int main() | |
$ cat /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp >> blink.cpp | |
# build binary |
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 findit = require('findit')('./posts'); | |
findit.on('file', function(file, stat) { | |
(fs.createReadStream(file)).pipe(through(function(data) { | |
this.queue(marked(data.toString())); | |
})).pipe(process.stdout); | |
}); |
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
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 200 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |
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
Light stream: 0.1728515625,0.171875,0.1728515625,0.171875,0.1728515625,0.1728515625,0.1728515625,0.171875,0.1728515625,0.1728515625, | |
Sound stream: 0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.0166015625,0.017578125,0.017578125,0.017578125,0.017578125, | |
Light stream: 0.1728515625,0.1728515625,0.171875,0.1728515625,0.1728515625,0.1728515625,0.1728515625,0.171875,0.171875,0.1728515625, | |
Sound stream: 0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125, | |
Light stream: 0.1728515625 | |
Current Light level: 0.1728515625 | |
Sound stream: 0.017578125 | |
Current Sound level: 0.017578125 | |
Light stream: 0.171875,0.171875,0.171875,0.171875,0.171875,0.1728515625,0.171875,0.1728515625,0.1728515625,0.171875, | |
Sound stream: 0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125,0.017578125, |
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
[{"homeScore":1,"awayScore":3,"currentGameMinute":null,"startTime":"2014-06-14T19:00:00.000Z","status":"Final","venue":"Estádio Governador Plácido Aderaldo Castelo (Fortaleza, Ceará)","group":"D","awayTeamId":"F77B348A-D7AE-4534-8ADA-8E52BEE64744","homeTeamId":"088C4113-CEFC-460C-830C-277C148C0CE7","id":"5CE66431-86C1-4BDB-8D9E-A07C238AE4B9","type":"Match"},{"homeScore":1,"awayScore":2,"currentGameMinute":null,"startTime":"2014-06-14T22:00:00.000Z","status":"Final","venue":"Arena Amazônia (Manaus, Amazonas)","group":"D","awayTeamId":"B61B25AA-CD8E-4778-AC26-DD08D7851990","homeTeamId":"2EFCFEB2-EBF8-4628-B659-B00C49D93811","id":"F07CB601-072A-4B11-91D7-DD36ABE6E98A","type":"Match"},{"homeScore":0,"awayScore":0,"currentGameMinute":null,"startTime":"2014-06-21T22:00:00.000Z","status":"Pre-game","venue":"Arena Pantanal (Cuiabá, Mato Grosso)","group":"F","awayTeamId":"74EA3831-DA4A-4093-B1E3-FD4EB45AA798","homeTeamId":"028EDCA8-6D1E-49CC-8442-A7A12E921E09","id":"26D94370-47AF-46A6-BA3E-8DFFB062B815","type":"Match" |
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
[{"name":"Netherlands","logo":"http://cache.images.globalsportsmedia.com/soccer/teams/150x150/1552.png","website":"http://www.knvb.nl","foundedYear":1889,"address":"Woudenbergseweg 56-58\n3700 AM\nZeist","homeStadium":"Amsterdam ArenA","stadiumCapacity":53052,"group":"B","groupRank":1,"groupPoints":3,"matchesPlayed":1,"wins":1,"losses":0,"draws":0,"goalsFor":5,"goalsAgainst":1,"goalsDiff":"+4","id":"FB6842E6-BB62-450D-98C0-A062610E6518","type":"Team"},{"name":"Chile","logo":"http://cache.images.globalsportsmedia.com/soccer/teams/150x150/424.png","website":"http://www.anfp.cl","foundedYear":1895,"address":"Avenida Quilín 5635, Comuna Peñalolén\nSantiago de Chile","homeStadium":"Estadio Nacional Julio Martínez Prádanos","stadiumCapacity":66660,"group":"B","groupRank":2,"groupPoints":3,"matchesPlayed":1,"wins":1,"losses":0,"draws":0,"goalsFor":3,"goalsAgainst":1,"goalsDiff":"+2","id":"9A319800-C80A-4FD9-9679-125D27246FB0","type":"Team"},{"name":"Australia","logo":"http://cache.images.globalsportsmedia.com/soccer |
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
curl --include --request GET "http://www.kimonolabs.com/api/ebkx0v2e?apikey=e228ca86c4c0624bfc30722ea22d7180" |
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
#!/usr/bin/env node | |
var argv = require('optimist') | |
.usage('Usage: --key=[consumer key] -secret=[consumer secret]') | |
.demand(['key', 'secret']) | |
.argv | |
; | |
var OAuth = require('oauth').OAuth; | |
var Step = require('step'); |
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 Sync = function(syncing, options) { | |
this.syncing = syncing; | |
this.url = syncing.url; | |
this.delay = syncing.delay; | |
} | |
_.extend(Sync.prototype, { | |
findAll: Promise.method(function() { | |
var sync = this; | |
return Promise.bind(this).then(function() { |
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
global.serverbone = require("serverbone"); | |
global.BaseModel = serverbone.models.BaseModel; | |
global.redis = require("redis"); | |
global.RedisDb = require('backbone-db-redis'); | |
global.store = new RedisDb('mymodel', redis.createClient()); | |
global.movieSchema = { | |
id: 'schemas/movies', | |
type: 'object', |
NewerOlder