Skip to content

Instantly share code, notes, and snippets.

View ericelliott's full-sized avatar
💭
https://leanpub.com/composingsoftware

Eric Elliott ericelliott

💭
https://leanpub.com/composingsoftware
View GitHub Profile
@Flet
Flet / thoughts.md
Created January 8, 2015 07:41
Thoughts on todotasks repo

Creating a new Task Runner Example

README.MD

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.
@ericelliott
ericelliott / .jshintrc
Last active August 29, 2015 14:15
Idiomatic JavaScript .jshintrc for Isomorphic JavaScript with Node style modules and Browserify
{
"maxerr": 10,
"node": true,
"browser": true,
"typed": true,
"worker": true,
"browserify": true,
"predef": ["define", "require"],
"camelcase": false,
"curly": true,
$ node --version
v5.2.0
$ npm ls
most-perf@0.10.0 /home/tylor/code/most/test/perf
├── @reactivex/rxjs@5.0.0-beta.1
├── baconjs@0.7.83
@ericelliott
ericelliott / args.js
Created June 24, 2011 08:05
Polymorphic functions and multiple dispatch in JavaScript
var args = [].slice.call(arguments, 0);
@ohanhi
ohanhi / joy-of-composition.md
Last active February 3, 2021 18:14
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

@traviskaufman
traviskaufman / jasmine-this-vars.md
Last active September 19, 2022 14:35
Better Jasmine Tests With `this`

Better Jasmine Tests With this

On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this object, and we've seen some awesome benefits from doing such.

The old way

Up until recently, a typical unit test for us looked something like this:

describe('views.Card', function() {
@rsperberg
rsperberg / essential-javascript-links.md
Last active October 5, 2022 17:10 — forked from ericelliott/essential-javascript-links.md
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
@maiermic
maiermic / variance.md
Last active September 26, 2023 16:07
Description of the four kinds of variance: covariance, contravariance, invariance and bivariance.

Variance

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:

# 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
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.

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).