Clone Mastodon's repository.
# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live
cd ~/live
const canvasSketch = require('canvas-sketch'); | |
const random = require('canvas-sketch-util/random'); | |
const { lerp, lerpArray } = require('canvas-sketch-util/math'); | |
const palettes = require('nice-color-palettes'); | |
const settings = { | |
dimensions: 'A4', | |
orientation: 'landscape', | |
units: 'cm', | |
pixelsPerInch: 300 |
React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".
With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.
Update: See https://github.com/muan/details-on-details instead.
I did a talk at Brooklyn JS called Details on <details>
on 2018/07/19. I have way more details prepared than the ones that fit in the slides, so here's the real details on <details>
. ❤️
– @muan
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Some things that are "better" with this BetterPromise
implementation:
BetterPromise # then(..)
accepts a BetterPromise
(or Promise
) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.
var p = BetterPromise.resolve(42);
var q = Promise.resolve(10);
p.then(console.log).then(q).then(console.log);
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code: