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
/** Bitcoin Smart-Contract with Resilience protocol | |
* pre-blockchain version for enthusiasts | |
*/ | |
var express = require('express'); | |
var app = express(); | |
var bodyParser = require('body-parser') | |
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
// To run: | |
// npm install globby | |
// node prepend-use-strict.js | |
var globby = require('globby'); | |
var fs = require('fs'); | |
globby('**/*.js', function(err, files) { | |
for (var i = 0, m = files.length; i < m; i++) { | |
var fileContent = fs.readFileSync(files[i]).toString(); |
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
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
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
import { combineReducers } from 'redux'; | |
import users from './reducers/users'; | |
import posts from './reducers/posts'; | |
export default function createReducer(asyncReducers) { | |
return combineReducers({ | |
users, | |
posts, | |
...asyncReducers | |
}); |
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
import React from 'react'; | |
import {List} from 'immutable'; | |
import {shouldComponentUpdate} from 'react-addons-pure-render-mixin'; | |
import {connect} from 'react-redux'; | |
import getFiltersData from './filtersData'; | |
import {filtersDataReady} from './reducer'; | |
const Filters = React.createClass({ | |
propTypes: { | |
getFiltersData: React.PropTypes.func.isRequired, |