Skip to content

Instantly share code, notes, and snippets.


Keith Irwin zentrope

View GitHub Profile
scttnlsn / core.cljs
Last active Jul 2, 2016
Om/Secretary nested routing
View core.cljs
(ns nested-routing.core
(:require-macros [om.core :as om]
[secretary.core :refer [defroute]])
(:require [om.dom :as dom]
[om.core :as om]
[secretary.core :as secretary]
[ :as events]
[goog.history.EventType :as EventType])
(:import goog.History))
View transducerfun.clj
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)
Chouser / externs_for_cljs.clj
Created Jun 17, 2013
Generate an externs.js file for arbitrary JS libraries for use in advanced Google Closure compilation, based on the ClojureScript code that uses the libraries.
View externs_for_cljs.clj
(ns n01se.externs-for-cljs
(:require [ :as io]
[cljs.compiler :as comp]
[cljs.analyzer :as ana]))
(defn read-file [file]
(let [eof (Object.)]
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))]
(vec (take-while #(not= % eof)
(repeatedly #(read stream false eof)))))))
drewolson / chat.go
Created Oct 25, 2012
simple golang chat server
View chat.go
package main
import (
type Client struct {
incoming chan string
outgoing chan string
View cells.clj
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(set! *warn-on-reflection* true)