Skip to content

Instantly share code, notes, and snippets.

@torgeir
torgeir / profile-with-chrome-devtools-and-improve--improved.html
Last active March 28, 2017 16:27 — forked from anonymous/debug-me.html
Faggruppemøte 2017-03-28: Performance: Profile and timeline debugging example, and improved version.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Bad example to debug :D</title>
<style>
.colors .colorBlock {
display: inline-block;
width: 1em;
@torgeir
torgeir / redux-ish.clj
Created May 28, 2017 14:47 — forked from nhusher/redux-ish.clj
Redux with basically no effort in clojurescript, plus core.async to handle asynchronous actions
(ns reduxish.state-tools
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async.impl.protocols :refer [WritePort ReadPort]]
[cljs.core.async :refer [<!]]))
(defn channel? [ch]
(and (satisfies? WritePort ch) (satisfies? ReadPort ch)))
(defn dispatch! [reducer state value]
(println value)