Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:
cd ~
sudo apt update
sudo apt upgrade
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/widgets.dart' hide PageView; | |
/// This is copy-pasted from the Flutter framework with a support added for building | |
/// pages off screen using [Viewport.cacheExtents] and a [LayoutBuilder] | |
/// | |
/// Based on commit 3932ffb1cd5dfa0c3891c60977ee4f9cd70ade66 on channel dev | |
// Having this global (mutable) page controller is a bit of a hack. We need it |
#!/bin/sh | |
OUTPUT="$(flutter analyze)" | |
echo "$OUTPUT" | |
echo | |
if grep -q "error •" <<< "$OUTPUT"; then | |
echo "flutter analyze found errors" | |
exit 1 | |
else | |
echo "flutter analyze didn't find any errors" | |
exit 0 |
static var httpClient = new HttpClient(); | |
Future<File> _downloadFile(String url, String filename) async { | |
var request = await httpClient.getUrl(Uri.parse(url)); | |
var response = await request.close(); | |
var bytes = await consolidateHttpClientResponseBytes(response); | |
String dir = (await getApplicationDocumentsDirectory()).path; | |
File file = new File('$dir/$filename'); | |
await file.writeAsBytes(bytes); | |
return file; | |
} |
export const flex = { | |
horizontal: { | |
display: 'flex', | |
flexDirection: 'row' | |
}, | |
vertical: { | |
display: 'flex', | |
flexDirection: 'column' | |
}, | |
flexWrap: { |
tl;dr I built a demo illustrating what it might look like to add async rendering to Facebook's commenting interface, while ensuring it appears on the screen simultaneous to the server-rendered story.
A key benefit of async rendering is that large updates don't block the main thread; instead, the work is spread out and performed during idle periods using cooperative scheduling.
But once you make something async, you introduce the possibility that things may appear on the screen at separate times. Especially when you're dealing with multiple UI frameworks, as is often the case at Facebook.
How do we solve this with React?
( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"; ) | |
yarn add babel-eslint | |
echo "{ | |
\"parser\": \"babel-eslint\", | |
\"env\": { | |
\"browser\": true, | |
\"node\": true, | |
\"jest\": true, | |
}, | |
\"extends\": \"airbnb\", |