Skip to content

Instantly share code, notes, and snippets.

View wuweiweiwu's full-sized avatar
🔥
speed: blazing

wei-wei wuweiweiwu

🔥
speed: blazing
View GitHub Profile
@wuweiweiwu
wuweiweiwu / setup.md
Last active January 8, 2020 06:27
Setting up Hadoop, Yarn, and Giraph for Distributed Systems Lab at University of Minnesota
@wuweiweiwu
wuweiweiwu / prepack-gentle-intro-1.md
Created May 8, 2018 23:42 — forked from gaearon/prepack-gentle-intro-1.md
A Gentle Introduction to Prepack, Part 1

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.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@wuweiweiwu
wuweiweiwu / f8-learnings.md
Last active May 17, 2018 20:05
Takeaways from Facebook F8 2018

Sessions

Keynote Day 1 - Mark Zuckerberg talks about data privacy and our responsibility as developers.

Type-Checked Python at Instagram - static typing using mypy (maintained by Dropbox) and how we can eliminate possible test cases so we can focus on tests with high granularity. Gradual typing of large codebases. Using MonkeyType to use runtime analysis to generate possible static types (e.g using tests).

How React Native Helps Companies Build Better Mobile Apps - Panel including Sophie Alpert, Engineering Manager for the React team. Reduce code duplication in codebases (iOS + Android). Learn once, write anywhere. Developers who have experience using React or React Native ca

@wuweiweiwu
wuweiweiwu / modules.js
Created May 26, 2018 22:35 — forked from branneman/1-globals.js
A history of different JavaScript module formats
/**
* Globals
*/
var Carrousel = function(elem) { this.init() };
Carrousel.prototype = { init: function() {} };
new Carrousel();
/**
* Namespacing
* - No globals (only the namespace variable itself is global)
@wuweiweiwu
wuweiweiwu / express-server-side-rendering.md
Created August 13, 2018 03:40 — forked from joepie91/express-server-side-rendering.md
Rendering pages server-side with Express (and Pug)

Terminology

  • View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
  • View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
  • HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
  • String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
@wuweiweiwu
wuweiweiwu / package.json
Created November 20, 2019 08:14 — forked from jayphelps/package.json
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@wuweiweiwu
wuweiweiwu / machine.js
Created April 17, 2020 21:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wuweiweiwu
wuweiweiwu / machine.js
Created April 28, 2020 18:49
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wuweiweiwu
wuweiweiwu / machine.js
Created April 29, 2020 00:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions