Install xvfb
apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
Some tips at: xvfb init script for Ubuntu
// Simulate a call to Dropbox or other service that can | |
// return an image as an ArrayBuffer. | |
var xhr = new XMLHttpRequest(); | |
// Use JSFiddle logo as a sample image to avoid complicating | |
// this example with cross-domain issues. | |
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true ); | |
// Ask for the result as an ArrayBuffer. | |
xhr.responseType = "arraybuffer"; |
Install xvfb
apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
Some tips at: xvfb init script for Ubuntu
The Three.js Blender exporter has been broken for at least the last 10 releases of Three.js. It's had at least 20 individual authors and contributors, most of whom have left the project never to return. Nevertheless, I have successfully imported animated (both with rigging and morph target) meshes into Three.js. Here's all the things I've encountered which you need to know about:
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https
git clone [email protected]:<hash>.git # or with ssh
We are processing items in bulk and want to have multiple jobs running for them without double sending emails or the like. We can't use offset
without potentially having that problem so we are considering splitting UUID ranges.
It should work like:
import React from 'react'; | |
import { connect as reduxConnect } from 'react-redux'; | |
function wrapWithContext(mapStateToProps, mapDispatchToProps, contextTypes, component) { | |
return class ConnectedComponent extends React.Component { | |
constructor(props, context) { | |
super(props, context); | |
/* | |
* This is the magic right here! |
import type { HostConfig, Reconciler } from 'react-fiber-types'; | |
import type { ReactNodeList } from 'react-fiber-types/ReactTypes'; | |
import DOMPropertyOperations from './DOMPropertyOperations'; | |
import type { | |
Props, | |
Container, | |
Instance, | |
TextInstance, | |
OpaqueHandle, |
/* eslint-disable import/prefer-default-export */ | |
// @flow | |
import { createSelectorCreator } from 'reselect'; | |
const defaultEqualityCheck = (a, b) => (a === b); | |
/** | |
* A selector that will only change the output if the first argument has changed. | |
*/ | |
export const firstArgSelector = createSelectorCreator( |
const util = require('util'); | |
const Transform = require('stream').Transform; | |
function Slicer (options) { | |
if (!(this instanceof Slicer)) { | |
return new Slicer(options); | |
} | |
Transform.call(this, options); | |
} |