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 crypto = require("crypto") | |
var User = function(attributes) { | |
this._attributes = attributes || {} | |
} | |
User.KEY_LENGTH = 32 | |
User.WORK_FACTOR = 20000 | |
User.prototype.setPassword = function(password, callback) { |
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
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require('react'), | |
Router = require('./Router') | |
module.exports = React.createClass({ | |
displayName: 'Application', |
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
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require('react'), | |
Router = require('./Router'), | |
Store = require('./Store'), | |
Head = require('./Head') | |
module.exports = React.createClass({ |
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 util = require('loader-utils'); | |
var File = require('vinyl'); | |
var gulp2webpack = function(streamConstructor, opt) { | |
opt = opt || {}; | |
return function(content) { | |
var cb = this.async(); | |
if (opt.cacheable) this.cacheable(); | |
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 Firebase = require('firebase-client'); | |
var AppConstants = require('../constants/AppConstants'); | |
var ServerActionCreators = require('../actions/ServerActionCreators'); | |
exports.openUsersConnection = once(function() { | |
var ref = new Firebase(AppConstants.FIREBASE_HOST+'/users').limit(100); | |
ref.on('value', function(snapshot) { | |
ServerActionCreators.receiveUsers(snapshot.val()); | |
}); | |
}); |
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
// This little dev server is basically a wrapped express server that 'hot loads' our javascript for super fancy and fast live reload in development | |
var webpack = require('webpack'); | |
var WebpackDevServer = require('webpack-dev-server'); | |
var config = require('./webpack.config'); | |
var port = process.env.HOT_LOAD_PORT || 3001; | |
new WebpackDevServer(webpack(config), { | |
publicPath: config.output.publicPath, | |
hot: true |
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 arrayFy(constructor) { | |
Object.getOwnPropertyNames( | |
Array.prototype | |
).forEach(function (key) { | |
var descriptor = Object.getOwnPropertyDescriptor( | |
Array.prototype, | |
key | |
); | |
if ( | |
typeof descriptor.value === 'function' && |
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 makeStyle(defaults, tagName) { | |
tagName = tagName || 'div'; | |
var Style = React.createClass({ | |
getDefaultProps: function() { | |
return assign({}, defaults); | |
}, | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; |
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 inherit = (function () { | |
function Constructor() { | |
// always reassign the initial | |
// prototype to avoid problems | |
// in jurassic engines | |
Constructor.prototype = cp; | |
} | |
// original prototype | |
var cp = Constructor.prototype; | |
// the inherit function |
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'; | |
export default React.createClass({ | |
animate(nextProps) { | |
const transition = d3 | |
.select(this.getDOMNode()) | |
.transition() | |
.duration(500); |
OlderNewer