Ties together Polymer and Reflux
Is a demo of using Polymer with Reflux via funk
These are thoughts pre-funk!
var util = require('util'); | |
var _ = require('lodash'); | |
var sinon = require('sinon'); | |
/** | |
* Replaces a query method on the given model object with a stub. The query | |
* will still operate on a callback, and allow full access to waterline's | |
* deferred object. However, the query will not cause any I/O and instead | |
* will immediately resolve to the given result. | |
* |
// Mock scheme for testing | |
server.auth.scheme('mock', function(server, options) { | |
return { | |
authenticate: function(request, reply) { | |
reply({credentials: options}); | |
} | |
}; | |
}); |
module.exports = function (graph, root) { | |
var traversal = graph.traverse(); | |
var edges = []; | |
var stack = [root]; | |
var current = null; | |
while (stack.length) { | |
traversal.hop(stack.pop()); |
Ties together Polymer and Reflux
Is a demo of using Polymer with Reflux via funk
These are thoughts pre-funk!
# from http://unix.stackexchange.com/a/168582 | |
supertouch() { | |
for p in "$@"; do | |
_dir="$(dirname -- "$p")" | |
[ -d "$_dir" ] || mkdir -p -- "$_dir" | |
touch -- "$p" | |
done | |
} |
var Hapi = require('hapi'); | |
// Keep track of the server's init state | |
var internals = { | |
initialized: false | |
}; | |
var server = new Hapi.Server(); | |
server.connection(); |
'use strict'; | |
const Knex = require('./knex'); | |
const knex = Knex({ | |
dialect: 'postgres', | |
connection: { | |
adapter: 'postgresql', | |
database: 'test', | |
user: 'postgres' |
# from https://github.com/hapijs/contrib/issues/90#issuecomment-224889568 | |
tar -tf $(npm pack) && rm *.tgz |
model
is a redux store.model.subscribe()
.model.dispatch()
.ReactRedux.connect()
and selectors (i.e. reselect).include /etc/nginx/conf.d/real-scheme.block; | |
upstream <app> { | |
server 127.0.0.1:<port>; | |
keepalive 16; | |
} | |
server { | |
listen 80; | |
server_name <server>; |