This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn do-tests [] | |
(when (seq @cemerick.cljs.test/registered-tests) | |
(cemerick.cljs.test/run-tests) | |
(reset! cemerick.cljs.test/registered-tests {}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.NullPointerException: null | |
at clojure.core$complement$fn__4048.invoke (core.clj:1357) | |
clojure.core$filter$fn__4226.invoke (core.clj:2529) | |
clojure.lang.LazySeq.sval (LazySeq.java:42) | |
clojure.lang.LazySeq.seq (LazySeq.java:60) | |
clojure.lang.RT.seq (RT.java:484) | |
clojure.core$seq.invoke (core.clj:133) | |
clojure.core$map$fn__4207.invoke (core.clj:2479) | |
clojure.lang.LazySeq.sval (LazySeq.java:42) | |
clojure.lang.LazySeq.seq (LazySeq.java:60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- do-selector-fn [] | |
(let [fn-sym (gensym "f") | |
arg (gensym "x") | |
invoke-specs (clojure.core/map | |
(fn [i syms] | |
(let [argslist (vec (take i syms)) | |
body `(~fn-sym (str (p/selector ~arg) | |
~@(clojure.core/map | |
(fn [sym] | |
`(p/selector ~sym)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns goog.css.datepicker | |
(:require [garden.stylesheet] | |
[garden.units] | |
[garden.def])) | |
(garden.def/defstyles datepicker | |
[".goog-date-picker" | |
".goog-date-picker th" | |
".goog-date-picker td" | |
{:font "13px Arial, sans-serif"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env boot | |
#tailrecursion.boot.core/version "2.0.0" | |
(set-env! | |
:dependencies '[[org.clojure/tools.cli "0.3.1"]]) | |
(require | |
'[clojure.string :as string] | |
'[clojure.tools.cli :refer [parse-opts]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out.noprompt=> lein repl | |
Retrieving org/clojure/tools.cli/0.2.4/tools.cli-0.2.4.pom from central | |
log4j:WARN No appenders could be found for logger (util.config). | |
log4j:WARN Please initialize the log4j system properly. | |
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. | |
nREPL server started on port 57882 on host 127.0.0.1 | |
REPL-y 0.3.0 | |
Clojure 1.5.1 | |
Docs: (doc function-name-here) | |
(find-doc "part-of-name-here") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro defntraced | |
"Define a function with it's inputs and output logged to the console." | |
[sym & body] | |
(let [[_ _ [_ & specs]] (macroexpand `(defn ~sym ~@body)) | |
new-specs (map | |
(fn [[args body]] | |
(let [prns (for [arg args] | |
`(js/console.log (str '~arg) "=" (pr-str ~arg)))] | |
(list | |
args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro defmemmethod [sym k & body] | |
(let [[d s m k f] (macroexpand `(defmethod ~sym ~k ~@body))] | |
`(~d ~s ~m ~k (memoize ~f)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn css-class->defhtml | |
"Given a css class return code for a defhtml." | |
[css-class] | |
(let [sym (symbol css-class)] | |
`(sablono.core/defhtml ~sym [& ~'content] | |
[:div {:class ~css-class} ~'content]))) | |
(def | |
^{:doc "Generated code for bootstrap defhtml. Covers .row, | |
.container, and all .col-<size>-<n> classes."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(extend-protocol ISwap | |
om/MapCursor | |
(-swap! [this f] | |
(om/transact! this f)) | |
(-swap! [this f a] | |
(om/transact! this #(f a))) | |
(-swap! [this f a b] | |
(om/transact! this #(f a b))) | |
(-swap! [this f a b xs] | |
(om/transact! this #(apply f a b xs)))) |
OlderNewer