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 pureRender = (Component) => { | |
Object.assign(Component.prototype, { | |
shouldComponentUpdate (nextProps, nextState) { | |
return !shallowEqual(this.props, nextProps) || | |
!shallowEqual(this.state, nextState); | |
} | |
}); | |
}; | |
module.exports = pureRender; |
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
package main | |
import ( | |
"fmt" | |
"github.com/moovweb/gokogiri" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"time" | |
) |
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
'use strict'; | |
var React = require('react/addons'); | |
var _ = require('lodash'); | |
var setClass = React.addons.classSet; | |
var MediaObject = React.createClass({ | |
render: function () { | |
var classes = setClass({ | |
'media-left': this.props.horizontalAlignment === 'left', |
Currently it for clent-side apps only. Not for universall (isomorphic) apps. Will add it soon
I'm using the promise middleware to dispatch actions like this:
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
package main | |
import ( | |
"github.com/jbcrail/ldap" | |
"fmt" | |
) | |
func main() { | |
server := "ldap01.example.com:389" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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 externalObj = {key: 'value'}; | |
var items = { | |
obj: { | |
'string prop': 'string val', | |
5: 10, | |
nested: [[3, [5, 2]]], | |
'function': function(){return true;}, | |
reference: externalObj | |
}, |
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
# elastic-mapreduce --create --name "Spark Example Project" --instance-type m1.xlarge --instance-count 3 \ | |
# --jobflow-role SparkRole --service-role EMR_DefaultRole \ | |
# --bootstrap-action s3://support.elasticmapreduce/spark/install-spark --bootstrap-name "Install Spark" \ | |
# --jar s3://elasticmapreduce/libs/script-runner/script-runner.jar --step-name "Run Spark Example Project" \ | |
# --step-action TERMINATE_JOB_FLOW \ | |
# --arg s3://snowplow-hosted-assets/common/spark/run-spark-job-0.1.0.sh \ | |
# --arg s3://sparkcluster/spark-example-project-0.2.0.jar \ | |
# --arg com.snowplowanalytics.spark.WordCountJob \ | |
# --arg s3n://sparkcluster/hello.txt \ | |
# --arg s3n://sparkcluster/results |