Skip to content

Instantly share code, notes, and snippets.

View aronallen's full-sized avatar

Aron Nyborg Allen aronallen

  • Copenhagen, Denmark
View GitHub Profile
@aronallen
aronallen / spoke.ts
Last active July 27, 2018 12:54
cycle-spoke
/*
Below is a simplified state management library for Cycle JS.
It is named after a spoke on a bicycle wheel, because a spoke at the bottom of the wheel will be at the top after a semi-revoltion.
cycle-spoke aims to be approachable, fun, fractal, and easy to use for developers who are familiar with reducers.
Any cycle component can be spoked, spoke creates a local circular reference, and you can have as many spoked components as you like.
It applies any reducers emitted from the components spoke sink to the internal state, and provides a source of the derived state.
A spoked component has no initial state, so you must emit a reducer that sets the initial state on load.
A spoked component may receive reducers from its parent. A spoked component returns it's state as a sink.
### Keybase proof
I hereby claim:
* I am aronallen on github.
* I am aronallen (https://keybase.io/aronallen) on keybase.
* I have a public key whose fingerprint is 1649 8FAC 6CB9 1E77 7739 DD51 E7A0 0252 D44A D8D6
To claim this, I am signing this object:
@aronallen
aronallen / display box is broken
Created November 1, 2011 14:31
display box is broken
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
nav{
display: -webkit-box;
display: box;
-webkit-box-orient: horizontal;
@aronallen
aronallen / display box is broken
Created November 1, 2011 14:30
Display box is broken
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
nav{
display: -webkit-box;
display: box;
-webkit-box-orient: horizontal;
@aronallen
aronallen / flex box css sample
Created November 1, 2011 14:09
flex box model
nav{
display: box;
box-orient: horizontal;
height:50px
}
nav a{
box-flex: 1;
display: block;
height:100%;