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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 graphql | |
# build_executable schema | |
# | |
# accepts schema_definition (string) and resolvers (object) in style of graphql-tools | |
# returns a schema ready for execution | |
def build_executable_schema(schema_definition, resolvers): | |
ast = graphql.parse(schema_definition) | |
schema = graphql.build_ast_schema(ast) |
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
const omit = (obj, omitProps) => Object.keys(obj) | |
.filter(key => omitProps.indexOf(key)===-1) | |
.reduce((returnObj, key) => ({ ...returnObj, [key]: 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
Show hidden characters
{ | |
"presets": [["env", { | |
"loose": 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
const pick = (obj, props) => Array.prototype.reduce.call( | |
props, | |
(built, prop) => ( | |
Object.prototype.hasOwnProperty.call(obj, prop) | |
? Object.assign({}, built, {[prop]: obj[prop]}) | |
: built | |
), {} | |
) |
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
const amqp = require('amqplib'); | |
class JackRabbit { | |
constructor(url, opts) { | |
this.channel = this.makeConnection(url, opts); | |
this.errorCB = (error) => console.log(error); | |
this.exchanges = {}; | |
this.queued = {}; | |
this.channel.catch((error) => this.errorCB(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
/* | |
[configuration] | |
[OptionRangeInteger] | |
GUIName = Distortion amount | |
OptionName = DISTORTION_FACTOR | |
MinValue = 1 | |
MaxValue = 10 | |
StepAmount = 1 | |
DefaultValue = 4 |
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'; | |
/* context helpers from: | |
* https://gist.github.com/ryanflorence/1e1290571337ebcea1c5a748e8f5b37d | |
*/ | |
import provideContext from './provideContext'; | |
import withContext from './withContext'; | |
const contextShape = React.PropTypes.shape({ |
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
module.exports = { | |
extensions: { | |
// clojurescript: require('./ext/clojurescript'), | |
clojure: require('./build/ext/clojure'), | |
clojurescript: require('./build/ext/clojurescript'), | |
coffee: require('./build/ext/coffee'), | |
babel: require('./build/ext/babel'), | |
html: require('./build/ext/html') | |
} | |
} |
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
// Main Post component, which initiates data fetching | |
import React from "react"; | |
import { resolve, context } from "react-resolver"; | |
import PostBody from "./PostBody.js"; | |
import PostMeta from "./PostMeta.js"; | |
/** | |
* Falcor routes constructed below: |
NewerOlder