Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
OSS on my mind

Tylor Steinberger TylorS

🍕
OSS on my mind
View GitHub Profile
View VirtualDOMLibraryGoals.md

Goals of the project

  • Programming, Motherfucker!
  • Clean fucking code, Motherfucker!
  • Virtual DOM shit, Motherfucker!
  • Faster than light, Motherfucker!
@TylorS
TylorS / example.html
Created Dec 22, 2015
GSAP Animations with Motorcycle.js
View example.html
<html>
<head>
<meta charset="utf-8">
<script src="http://www.jaybirdsport.com/static/js/greensock/plugins/ThrowPropsPlugin.min.js"></script>
</head>
<body>
<div id="test-container"></div>
<!-- Generated by `npm run test-browser` -->
<script src="tests-bundle.js"></script>
</body>
View hyperscriptHelper-module-provider.json
{
"presets": ["es2015"],
"plugins": [
["module-provider", {
"@cycle/dom": ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base",
"bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption",
"cite", "code", "col", "colgroup", "dd", "del", "dfn", "dir", "div", "dl",
"dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form",
"h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html",
"i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend",
View ObservableBenchmarks.md
$ 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
@TylorS
TylorS / most.d.ts
Last active May 8, 2016
Most.js Typescript definition
View most.d.ts
type SeedValue<S, V> = { seed: S, value: V };
type TimeValue<V> = { time: number, value: V };
type CreateGenerator<A> = (...args: Array<any>) => Generator<A|Promise<A>, any, any>;
declare type Stream<A> = {
reduce<B>(f: (b: B, a: A) => B, b: B): Promise<B>;
observe(f: (a: A) => any): Promise<any>;
forEach(f: (a: A) => any): Promise<any>;
drain(): Promise<any>;
@TylorS
TylorS / fastjs-benchmarks.sh
Created Jan 26, 2016
Fast.js benchmarks - node v5.5.0
View fastjs-benchmarks.sh
Running 55 benchmarks, please wait...
Native .fill() vs fast.fill() (3 items)
Array.prototype.fill() x 12,868,637 ops/sec ±4.44% (66 runs sampled)
fast.fill() x 25,604,456 ops/sec ±2.60% (64 runs sampled)
Result: fast.js is 98.97% faster than Array.prototype.fill().
Native .fill() vs fast.fill() (10 items)
Array.prototype.fill() x 7,098,897 ops/sec ±4.15% (74 runs sampled)
View motorcycle-react.js
import React from 'react';
import ReactDOM from 'react-dom';
import { holdSubject } from 'most-subject';
import App from '../containers/App';
import FriendSearchView from '../containers/FriendSearchView';
export default function viewDriver(state$) {
const searchChange$ = holdSubject(1);
const searchKeyDown$ = holdSubject(1);
View google-maps.js
import {div, thunk} from '@motorcycle/dom'
function googleMaps(center, zoom) {
return div({
hook: {
insert({elm}) {
const map = new google.maps.Map(elm, {
center,
zoom,
})