- http://requirebin.com?gist=maxogden/9576573
- http://requirebin.com?gist=hughsk/5941408
- http://requirebin.com?gist=hughsk/6031068
- http://requirebin.com?gist=maxogden/9576699
- http://requirebin.com?gist=maxogden/9576799
- http://requirebin.com?gist=maxogden/9576995
- http://requirebin.com?gist=maxogden/5953535&q=level
- http://requirebin.com?gist=maxogden/9425656
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
(ns react-cljs.core | |
(:require-macros [reactjs.macros :refer [pure]]) | |
(:require React [reactjs.core :as r])) | |
(enable-console-print!) | |
(declare render-ui) | |
(defn render-counter [id state cb] | |
(pure state |
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
fs = require 'fs' | |
noflo = require 'noflo' | |
split = require 'split' | |
class ReadFileStream extends noflo.Component | |
constructor: -> | |
@inPorts = | |
in: new noflo.Port() | |
@outPorts = | |
out: new noflo.Port() |
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
{ | |
"properties": { | |
"environment": { | |
"runtime": "html", | |
"content": "<div class='area' title='.area'>\n <img id='clock' src='https://i.imgur.com/0S7R8OU.png' style='position:absolute; width:300px; height:300px; top:0; left:0;' />\n <img id='hours' src='https://i.imgur.com/Fw8L3L1.png' style='position:absolute; top:50px; left:130px; height:200px;' />\n <img id='minutes' src='https://i.imgur.com/WtSz99Q.png' style='position:absolute; top:0; left:140px; height:300px;' />\n <img id='seconds' src='https://i.imgur.com/m2PQs6E.png' style='position:absolute; top:0; left:145px; height:300px;' />\n</div>", | |
"width": 300, | |
"height": 300, | |
"src": "./preview/iframe.html" | |
}, | |
"name": "NoFlo" |
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
endScrollMomentum = function(event) { | |
var animation, constant1, constant2, totalVelocity, touchEvent, velocity; | |
touchEvent = Events.sanitize(event); | |
constant1 = 1000; | |
constant2 = 0; | |
velocity = dragger.calculateVelocity(); |
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 Rx = require('rx'); | |
var fs = require('fs'); | |
function allExists (files) { | |
return Rx.Observable.for(files, | |
function (file) { | |
return Rx.Node.fromCallback(fs.exists)(file); | |
} | |
) | |
.all(); |
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
function Behavior(PSD){ | |
var _BehaviorNames = Object.keys(Behavior.behaviors) | |
.filter(function(BehaviorName){ return !!Behavior.behaviors[BehaviorName].namingPattern }); | |
Object.keys(PSD).forEach(function(layerName){ | |
var layer = PSD[layerName]; | |
_BehaviorNames.forEach(function(BehaviorName){ | |
var match = layerName.match(Behavior.behaviors[BehaviorName].namingPattern); | |
try { |
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
o.toObservable = function () { | |
var o = this; | |
return Rx.Observable.create(function (obs) { | |
function handler (e) { | |
obs.onNext(e); | |
} | |
Object.observe(o, handler); | |
return 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
var bplistParser = require('bplist-parser') | |
var bplistCreator = require('node-bplist-creator') | |
var fs = require('fs') | |
var DFGraph = {} | |
DFGraph.edgeFromQCConnection = function(qcConnection, connectionKey){ | |
return { | |
source:{node: qcConnection.sourceNode, port:qcConnection.sourcePort}, | |
target:{node: qcConnection.destinationNode, port:qcConnection.destinationPort} |
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
tim@touchsmart:~/Code$ nvm use v0.11.2-generators | |
Now using node v0.11.2-generators | |
tim@touchsmart:~/Code$ node --harmony testgen.js | |
<Buffer 76 61 72 20 66 73 20 3d 20 72 65 71 75 69 72 65 28 27 66 73 27 29 3b 0a 66 75 6e 63 74 69 6f 6e 20 72 65 61 64 46 69 6c 65 28 70 61 74 68 2c 20 65 6e 63 ...> | |
Sleeping for 2000ms... | |
Done |