Skip to content

Instantly share code, notes, and snippets.

(ns om-tutorial.X-Query-Exercises
(:require-macros
[cljs.test :refer [is]])
(:require [om.next :as om]
[om-tutorial.queries.query-editing :as qe]
[devcards.core :as dc :refer-macros [defcard defcard-doc deftest]]))
(def bird-db
{:birds/by-id {1 {:bird/id 1 :bird/name "Robin"}
2 {:bird/id 2 :bird/name "Blackbird"}
@grzm
grzm / core.cljs
Last active August 29, 2015 14:19
Clojurescript namespace not referenced in simple compilation
(ns macro-ex.core
(:require [cljs.nodejs :as nodejs])
(:require-macros [macro-ex.macros :refer [fancify]]))
(nodejs/enable-util-print!)
(defn -main []
(println "Hello world!")
(fancify "Well, hello, there!"))
@grzm
grzm / core.cljs
Created April 17, 2015 16:32
Attempt to ascend from nodejs callback hell
(ns node-async.core
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :refer [chan <! close!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
(defn run-task [f & args]
"from https://gist.github.com/swannodette/6385166"
(let [out (chan)
@grzm
grzm / core.cljs
Last active January 3, 2016 21:49
Attempt to straight-line sequential callbacks using core.async
(ns node-async.core
(:require-macros [cljs.core.async.macros :refer [go]]
[node-async.macros :refer [<?]])
(:require [cljs.core.async :refer [take!]]
[node-async.task :refer [run-task]]))
;; run-task and <? appropriated from dnolen
;; https://gist.github.com/swannodette/6385166
;; https://github.com/swannodette/swannodette.github.com/blob/master/code/blog/src/blog/utils/macros.clj
;; https://github.com/swannodette/swannodette.github.com/blob/master/code/blog/src/blog/utils/helpers.cljs
@grzm
grzm / index.html
Created September 30, 2013 13:05
Appending to a datetime histogram.
<html>
<head>
<style>
body {
font-size: 100%;
font-family: "HelveticaNeue-Light",
"Helvetica Neue UltraLight", "Helvetica Neue", "Helvetica", sans-serif;
line-height: 150%
}