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
/* | |
* this object is a set of streams that can be subscribed to | |
* forworking with the minimal interface. | |
* | |
* up, down, left, right, enter | |
* | |
*/ | |
var Rx = require('rx'); | |
var _ = require('lodash'); |
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 _ = require('lodash'); | |
var PUBNUB = require('pubnub'); | |
var Promise = require('bluebird'); | |
var secret = 'demo_secret'; | |
var pubnub = PUBNUB.init({ | |
publish_key: 'demo', | |
subscribe_key: 'demo', | |
secret_key: secret | |
}); |
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 gulp = require("gulp"); | |
var less = require('gulp-less'); | |
var path = require('path'); | |
var jsx = require('gulp-jsx'); | |
var _ = require('lodash'); | |
var watch = require('gulp-watch'); | |
var plumber = require('gulp-plumber'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
var source = require('vinyl-source-stream'); |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "syslog" | |
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog"] | |
start_position => "beginning" | |
} |
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
//assume args is an array | |
var partial = function(fn, args1) { | |
return function() { | |
var args2 = Array.protoype.slice.call(arguments); | |
return fn.apply(this. args1.concat(args2)); | |
}; | |
}; | |
var loop = function(fn) { |
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
/* | |
* cascade takes a function f1, f2, f3 etc, and composes them such that | |
* f1 is passsed the args to f1 + a next which partiallly applies them to f2 and | |
* so forth. | |
*/ | |
//takes the arguments as a array instead of serially | |
var bind = function(fn, ctx, args) { | |
return function(args2) { | |
args2 = args.concat(Array.prototype.slice.call(arguments)); |
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
object Foo { | |
def factorial(n:Int): Int = { | |
def factorialIter( n: Int , acc: Int, initial: Int) : Int = { | |
if (initial == n) | |
acc * initial | |
else | |
factorialIter(n, acc * initial, initial + 1) |
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
/* jslint indent: 2 */ | |
var MyObject = function() { | |
}; | |
MyObject.prototype = Object.create(Object.prototype); | |
MyObject.prototype.noop = 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
<!doctype html> | |
<html> | |
<head> | |
<title>clock</title> | |
<style type="text/css" media="screen"> | |
.container { | |
width: 800px; | |
margin: auto; | |
} | |
.chart { |
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
<!doctype html> | |
<html> | |
<head> | |
<title>clock</title> | |
<style type="text/css" media="screen"> | |
.container { | |
width: 800px; | |
margin: auto; | |
} | |
.chart { |
NewerOlder