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, { Component, PropTypes } from 'react'; | |
import { Block, Flex } from 'jsxstyle'; | |
import L from '../LayoutConstants'; | |
import TextArea from 'react-textarea-autosize'; | |
class Input extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
focused: false, |
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'), | |
escapeTextForBrowser = require('react/lib/escapeTextForBrowser'), | |
{ PropTypes } = React; | |
var UncontrolledContentEditable = React.createClass({ | |
propTypes: { | |
component: PropTypes.func, |
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 class ContentEditable extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
showPlaceholder: true, | |
}; | |
this.emitChange = this.emitChange.bind(this); | |
this.handleClick = this.handleClick.bind(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
export default function fetchComponentData(dispatch, components, params) { | |
const needs = components.reduce( (prev, current) => { | |
return Object.keys(current).reduce( (acc, key) => { | |
return current[key].hasOwnProperty('needs') ? current[key].needs.concat(acc) : acc | |
}, prev) | |
}, []); |
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 express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
var hbs = require('hbs'); | |
app.set('view engine', 'html'); | |
app.engine('html', hbs.__express); | |
app.use(express.json()); | |
app.use(express.urlencoded()); |
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 Immutable, { fromJS } from 'immutable'; | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Router } from 'react-router'; | |
import { createHistory, useQueries } from 'history'; | |
import { Provider } from 'react-redux'; | |
import routes from 'universal/routes'; |
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
/* | |
* Code snippet for posting tweets to your own twitter account from node.js. | |
* You must first create an app through twitter, grab the apps key/secret, | |
* and generate your access token/secret (should be same page that you get the | |
* app key/secret). | |
* Uses oauth package found below: | |
* https://github.com/ciaranj/node-oauth | |
* npm install oauth | |
* For additional usage beyond status updates, refer to twitter api | |
* https://dev.twitter.com/docs/api/1.1 |
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 promiseCSV = require('promiseCSV.js'); | |
var path = "in.csv"; | |
var options = { 'headers': true }; | |
promiseCSV(path, options).then(function (records) { | |
// do other stuff | |
}); |
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
<h4 style="font-size: 16px; font-weight: bold; letter-spacing: .02em; color: #0070ff !important; font-family: -apple-system,BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.4em; margin: 0 0 6px;">TOP STORIES</h4> |
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
/party/:id | |
/person/:id | |
id | |
isActive | |
firstName | |
lastName | |
designation | |
billingAddress {} |