Skip to content

Instantly share code, notes, and snippets.

Patrick Mulder mulderp

Block or report user

Report or block mulderp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:36ca39a9911d54de66ec
# 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
View gist:14073312b462a153ae11
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);
});
@mulderp
mulderp / index.js
Created Aug 31, 2014
requirebin sketch
View index.js
// 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")
View gist:be1ce57f6c6b33df602c
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,
View gist:654b8c5a3a71c5f872f3
[{"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"
View gist:f0c178418bcdc70a2852
[{"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
View gist:890eb3b7473b98a3a91a
curl --include --request GET "http://www.kimonolabs.com/api/ebkx0v2e?apikey=e228ca86c4c0624bfc30722ea22d7180"
@mulderp
mulderp / gist:22174782ebe36bce0c50
Created May 21, 2014
get access token via Twitter oauth
View gist:22174782ebe36bce0c50
#!/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');
@mulderp
mulderp / gist:11349911
Created Apr 27, 2014
returns undefined ?
View gist:11349911
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() {
@mulderp
mulderp / gist:9740253
Created Mar 24, 2014
serverbone test
View gist:9740253
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',
You can’t perform that action at this time.