state-machine-component
A tiny (265 byte) utility to create state machine components using two pure functions.
Usage
The API is a single function that accepts 2 pure functions as arguments:
A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
// a basic example demonstrating the power of channels and generators | |
import React from 'react' | |
import { render } from 'react-dom' | |
import { chan, go, take, put, putAsync } from 'js-csp' | |
import { curry } from 'ramda' | |
import Counter from './Counter' | |
// helper | |
const createRender = curry((node, app) => render(app, node)) | |
// create one channel for now |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
Proposal for this year's Reactive lightning talks @ReactiveConf - If you want to see my talk, star this gist please :-) [Reactive Blogpost][reactive-conference-blogpost]
As a JavaScript developer, could you imagine using something else than Atom, Sublime or other IDE-like text-editors? During their daily work, people wrangle a lot with different applications, editors, windows, browsers and loose a lot of time because of their tools getting in their way.
docker-machine
import/exportScript to import and export docker-machine configurations to sync between hosts/collaborators
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dev - digitalocean Running tcp://example.com:2376 v1.10.1
var { PropTypes, requireNativeComponent } = require('react-native'); | |
var React = require('react-native') | |
var { | |
StyleSheet, | |
View, | |
} = React; | |
var iface = { | |
name: 'AdmobView', |
(ns wsclj.core | |
(:gen-class) | |
(:import [javax.jws WebService]) | |
(:import [javax.xml.ws Endpoint])) | |
;; Based on a blog-comment by Jonathan Seltzer | |
(defprotocol Calculator | |
(hello [this yourname]) | |
(add [this a b]) |
(use '[clojure.core.match :only [match]]) | |
(defn evaluate [env [sym x y]] | |
(match [sym] | |
['Number] x | |
['Add] (+ (evaluate env x) (evaluate env y)) | |
['Multiply] (* (evaluate env x) (evaluate env y)) | |
['Variable] (env x))) | |
(def environment {"a" 3, "b" 4, "c" 5}) |