This file contains 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 describe, it */ | |
let {expect} = require('chai'); | |
let {Map, List, Set, Stack} = require('immutable'); | |
let t2 = require('transduce'); | |
describe('Immutable Transducer support', ()=> { | |
it('List supports transducer protocols', () => { | |
let val = t2.into(List(), t2.filter(()=>true), ['a', 'b', 'c']).toJS(); | |
expect(val).to.deep.equal(['a', 'b', 'c']); | |
}); |
This file contains 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
http://eslint.org/docs/rules/no-extend-native | |
http://eslint.org/docs/rules/no-return-assign | |
http://eslint.org/docs/rules/no-param-reassign | |
http://eslint.org/docs/rules/no-native-reassign | |
http://eslint.org/docs/rules/no-extend-native | |
http://eslint.org/docs/rules/no-ex-assign | |
http://eslint.org/docs/rules/no-func-assign | |
http://eslint.org/docs/rules/no-ex-assign |
This file contains 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 through2 = require('through2'); | |
var through = require('through'); | |
var fs = require('fs'); | |
//This is what most people use | |
fs.createReadStream('testStreams.js') | |
.pipe(through2(function(chunk, enc, cb) { | |
console.log('t2', 's1'); | |
cb(null, chunk); | |
}, function(cb) { |
This file contains 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
br { | |
display: none !important; | |
} | |
html * { | |
display: inline !important; | |
font-size: 6pt !important; | |
float: none !important; | |
word-wrap: nowrap !important; | |
white-space: nowrap !important; | |
position: static !important; |
This file contains 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
newtonApprox = (x0, f, fprime, error) -> | |
x1 = x0 - f(x0)/fprime(x0) | |
if Math.abs(x1-x0) < error | |
x1 | |
else | |
newtonApprox(x1, f, fprime, error) |
This file contains 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
alias cleanbr='!git branch -r --no-color --merged | grep -v \"/\\(master\\|develop\\|integration\\)$\" | sed \"s/\\// :/\" | xargs -L1 git push && git branch --no-color --merged | grep -v \" \\(master\\|develop\\|integration\\)$\" | xargs -L1 git br -d' |
This file contains 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 MONGO_URI = process.env.MONGOLAB_URI || 'mongodb://127.0.0.1:27017/test'; | |
var PORT = process.env.PORT || 8000; | |
var url = require('url'); | |
var REDIS_URI = url.parse(process.env.REDISTOGO_URL || "redis://dev:[email protected]/"); | |
var express = require('express'); | |
var sio = require('socket.io'); | |
var rss = require('rss'); | |
var RedisStore = require('connect-redis')(express); | |
var redisAuth = REDIS_URI.auth.split(':'); |
This file contains 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
# reflexive layout based on em's | |
(($el, scale) -> | |
win = $(window) | |
# simplified version of fittext.js | |
resize = -> | |
$el.css 'font-size', win.width()/scale | |
resize() | |
win.on 'resize', resize | |
) $("body"), 80.0 |
This file contains 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
//Work around to force refresh of #pains in chrome | |
var pains = $("#pains"); | |
console.log($("#pains").css("-webkit-transform")); | |
if ($("#pains").css("-webkit-transform") == "translateZ(1px)") { | |
$("#pains").css("-webkit-transform","none"); | |
} | |
else { | |
$("#pains").css("-webkit-transform",'translateZ(1px)'); | |
} |