Skip to content

Instantly share code, notes, and snippets.

View fuunnx's full-sized avatar
💭
🤯

Géraud Henrion fuunnx

💭
🤯
View GitHub Profile
@fuunnx
fuunnx / webpack.config.js
Created November 6, 2016 18:01 — forked from oxpa/webpack.config.js
webpack configuration suitable for static content generator plugin and chunks
var ReactDom = require("react-dom");
var Redux = require("redux");
var ReactRouter = require("react-router");
var ReactRedux = require("react-redux");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var window={}
var getElementsByTagName = function (b) {
@fuunnx
fuunnx / helper.js
Created September 16, 2016 14:06 — forked from staltz/helper.js
How to use Stanga (https://github.com/milankinen/stanga) as a wrapper, not as a driver
// Generic helper function that takes a main() (the top-level component)
// and wraps it with Stanga logic
function wrapWithStanga(main, initialState) {
return function (sources) {
const modProxy$ = new Subject();
const modelSource = Model(initialState)(modProxy$);
sources.model = modelSource;
const sinks = main(sources);
sinks.model.subscribe(modProxy$);
/*
I have a queue that clients submit tasks to, this backend worker consumes them
firebaseDriver: provides a function that generates a one-element observable of a firebase location
queueConsumerDriver: provides a source of all incoming requests, consumes a sink that takes responses
knows via the uid in the response what channel to send it back on
*/
import {makeFirebaseDriver, makeQueueConsumerDriver} from 'cyclic-fire'