Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
var tls = require('tls'); | |
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
var zlib = require('zlib'); | |
var BufferList = require('bufferlist'); | |
var Binary = require('bufferlist/binary'); | |
var Put = require('put'); | |
var http = require('http'); | |
var options = |
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
var request = require('request').defaults({json: true}), | |
transfuse = require('transfuse'), | |
JSONStream = require('JSONStream'); | |
function transform(couchdb, funcString, headers) { | |
var down = request({url: couchdb + '/_all_docs?include_docs=true'}), | |
up = request({url: couchdb + '/_bulk_docs', method: "POST", headers: headers}), | |
tr = transfuse(['rows', /./, 'doc'], funcString, JSONStream.stringify("{\"docs\":[\n", "\n,\n", "\n]}\n")); | |
down.pipe(tr) | |
tr.pipe(up) |
Hypermedia designs scale better, are more easily changed and promote decoupling | |
and encapsulation, with all the benefits those things bring. On the downside, | |
it is not necessarily the most latency-tolerant design, and caches can get stale | |
if you're not careful. It may not be as efficient on an individual request level | |
as other designs. |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent