Skip to content

Instantly share code, notes, and snippets.

Avatar

André Staltz staltz

View GitHub Profile
View tribes
const tribes = require("ssb-tribes")
const Bot = require("scuttle-testbot")
const Stack = Bot.use(require("ssb-backlinks")).use(tribes)
const bot = Stack()
const Stack2 = Bot.use(require("ssb-backlinks")).use(tribes)
const bot2 = Stack2()
bot.tribes.create({}, (err, data) => {
View issue-management.md

Rethinking issue management

The core problem

FOSS developers suffer burnouts that cause them to loose interest in their projects, and cause the projects to die.

Wondering about why this happens, we came to the conclusion that maintaining a project, especially on the issue tracker part, is felt as a burden and a really annoying thing. Most of FOSS development today is made around Github, which

@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active Jul 20, 2020
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry
View reactiveconf-slam-poetry.md

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@treshugart
treshugart / example.jsx
Last active Mar 10, 2020
Give yourself full control over the DOM that any hyperscript VDOM style function creates http://www.webpackbin.com/4kR0ZnXFf
View example.jsx
import hify from './create-element';
import React from 'react';
import { render } from 'react-dom';
const h = hify(React.createElement.bind(React));
class Test extends HTMLElement {
static observedAttributes = ['attr']
attributeChangedCallback (name, oldValue, newValue) {
this.innerHTML = `Hello, ${this.getAttribute('attr')}!`;
@srdjan
srdjan / 100+ different counter apps...
Last active May 18, 2021
More than 100 different counter applications...
View 100+ different counter apps...
100+ different js counter applications...
@geovanisouza92
geovanisouza92 / main.js
Last active Apr 24, 2020
Reactive expression evaluator
View main.js
import {run} from '@cycle/xstream-run'
import {makeDOMDriver, div, input, button, label} from '@cycle/dom'
import {makeLocalStorageDriver} from 'cyclejs-storage'
import Collection from '@cycle/collection'
import xs from 'xstream'
import debounce from 'xstream/extra/debounce'
import dropRepeats from 'xstream/extra/dropRepeats'
import pairwise from 'xstream/extra/pairwise'
import delay from 'xstream/extra/delay'
import concat from 'xstream/extra/concat'
View most-subject-benchmark.md
~/code/most/most-subject/perf subject-class* 19s
❯ node ./filter-map-reduce.js
filter -> map -> reduce 1000000 integers
-----------------------------------------------
most         14.20 op/s ±  0.83%   (68 samples)
xstream      21.91 op/s ±  1.90%   (29 samples)
rx 5          4.68 op/s ±  1.12%   (16 samples)
-----------------------------------------------
View rxjs-saga-auth.js
import { createStore, applyMiddleware } from 'redux';
import { Observable, Subject } from 'rxjs';
const api = type => {
console.log(`calling API ${type}`);
return new Promise(res => setTimeout(() => res(), 500));
};
const actionOrder = (actions, order) => actions.every((action, index) => action.type === order[index]);
const actionPredicate = actions => filterableAction => actions.some(action => action === filterableAction.type);
@zudov
zudov / Cycle-IO.md
Last active Dec 29, 2015
Cycle's approach to handling the IO
View Cycle-IO.md

Cycle.js approach to handling IO looks similar to how it was done in earlier FRP implementations. That seems to be an independent discovery, and that's always even better.

Yampa provides a function reactimate:

:: IO a	-- ^ IO initialization action
-> (Bool -> IO (DTime, Maybe a)) -- ^ IO input sensing action
-> (Bool -> b -> IO Bool)        -- ^ IO actuaction (output processing) action
-> SF a b	-- ^ Signal function
@antonycourtney
antonycourtney / DiamondExample.md
Last active Mar 10, 2020
A real world example of recombinant / diamond wiring and feedback with RxJS
View DiamondExample.md

A realistic RxJS app with diamond wiring

Consider the following user interface (inspired by Strava) for looking at time-series charts of network data:

esnet-estes-charts

Notes on this interface and my Rx implementation of it:

  • Each chart (stacked vertically) charts a different metric (latency, packet loss and throughput) but over the same time period.
  • As the user moves the mouse left and right on any chart, the vertical line (called the tracker) moves to track the mouse position on all charts. The number displayed in the gray box on the right is the value underneath the tracker for that metric.