Skip to content

Instantly share code, notes, and snippets.


Eric Elliott ericelliott

View GitHub Profile
maiermic /
Last active Mar 6, 2020
Description of the four kinds of variance: covariance, contravariance, invariance and bivariance.


The term variance describes how subtyping between higher kinded types is related to subtyping relations of their type arguments.

Higher Kinded Types

A higher kinded type composes type arguments to a new type. I use square bracket notation to define a higher kinded type:

C[T] // The higher kinded type `C` composes type argument `T` to a new type `C[T]`.

The same works with multiple type arguments:

$ node --version
$ npm ls
most-perf@0.10.0 /home/tylor/code/most/test/perf
├── @reactivex/rxjs@5.0.0-beta.1
├── baconjs@0.7.83
ohanhi /
Last active Mar 10, 2020
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views

paulirish /
Last active Sep 27, 2020
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

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.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
ericelliott / .jshintrc
Last active Aug 29, 2015
Idiomatic JavaScript .jshintrc for Isomorphic JavaScript with Node style modules and Browserify
View .jshintrc
"maxerr": 10,
"node": true,
"browser": true,
"typed": true,
"worker": true,
"browserify": true,
"predef": ["define", "require"],
"camelcase": false,
"curly": true,
View gist:598fa75e22bdfa44cf47

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.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

rsperberg /
Last active Jun 9, 2020 — forked from ericelliott/
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
Flet /
Created Jan 8, 2015
Thoughts on todotasks repo

Creating a new Task Runner Example


Every task runner should have a README.MD file with the following sections:

  • Overview
    • Explain the focus/goals of the task runner and include links to resources and tutorials.
You can’t perform that action at this time.