Skip to content

Instantly share code, notes, and snippets.

View gist:6a31372d05327c29df80c19a6180eac1
ERROR in (you-get-notifications) (Util.java:177)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.StackOverflowError: null
at clojure.lang.Util.dohasheq (Util.java:177)
clojure.lang.Util.hasheq (Util.java:168)
clojure.lang.PersistentHashMap.hash (PersistentHashMap.java:120)
clojure.lang.PersistentHashMap$TransientHashMap.doAssoc (PersistentHashMap.java:324)
clojure.lang.ATransientMap.assoc (ATransientMap.java:64)
clojure.lang.PersistentHashMap.create (PersistentHashMap.java:78)
View clojure
ERROR in (you-get-notifications) (Util.java:177)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.StackOverflowError: null
at clojure.lang.Util.dohasheq (Util.java:177)
clojure.lang.Util.hasheq (Util.java:168)
clojure.lang.PersistentHashMap.hash (PersistentHashMap.java:120)
clojure.lang.PersistentHashMap$TransientHashMap.doAssoc (PersistentHashMap.java:324)
clojure.lang.ATransientMap.assoc (ATransientMap.java:64)
clojure.lang.PersistentHashMap.create (PersistentHashMap.java:78)
View gist:1eea2d3f04122435487844c4c68f7c58
:cljsbuild {:builds {:app {:source-paths ["src/cljs" "src/cljc"]
:compiler {:output-to "target/cljsbuild/public/js/app.js"
:externs ["resources/public/js.js"
"resources/externs/pica.ext.js"
"resources/externs/moment.ext.js"
"resources/externs/jquery.ext.js"
"resources/externs/jquery-ui.ext.js"
"resources/externs/materialize.ext.js"
"resources/externs/mdl.ext.js"
"resources/externs/lodash.ext.js"
View gist:a8be3bbf074339cc03c93a7b1df0f837
:figwheel {:http-server-root "public"
:compile {:recompile-dependents false}
:server-port 3449
:hawk-options {:watcher :polling}
:nrepl-port 7002
:css-dirs ["resources/public/css"]
:nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl"]
:ring-handler im.handler/app}
View gist:5d9be91b589b80c41ab5e4d129474666
(defn watermark-arguments [{:keys [id] :as message}]
[(:watermark message)
(:watermark-out message)
"bfa.co/"
"-font" (str (System/getProperty "user.dir") "/resources/public/webfonts/31D41C_0_0.ttf")
"-fill" "white"
"-gravity" "west"
"-pointsize" "32"
"-font" (str (System/getProperty "user.dir") "/resources/public/webfonts/31D41C_0_0.ttf")
"-annotate" "+5+25"
View gist:75451acf435a877df198abe4a028042c
(defn max-fk-for-org
"query runs way too slow"
[org]
(ffirst
(d/q '[:find (max ?fk)
:in $ ?org
:where
[?collection :collection/organization ?org]
[?content :content/collection ?collection]
[?content :content/fk ?fk]]
View gist:b9d62366c46ba078051bad849e82c200
(defn max-fk [org]
(ffirst
(d/q '[:find (max ?fk)
:in $ ?org
:where
[?collection :collection/organization ?org]
[?content :content/collection ?collection]
[?content :content/fk ?fk]]
(db/_d) org)))
View gist:174741e33b88b09b66e6f0281e3cd6ca
(defn cart-line-items [cid _db & [organization]]
(d/q '[:find ?e ?org ?name ?price ?dl_or_ph
:in $ ?cart
:where
[?e :line_item/cart ?cart]
[?cart :cart/subtotal ?subtotal]
[?e :line_item/content ?content]
[?e :line_item/dl_or_ph ?dl_or_ph]
[?e :line_item/price ?price]
[?content :content/collection ?coll]
View gist:b74e35083aad38428b2587d182bd6144
(let [c (chan)]
(go
(let [func (fn [] (>! c "callback"))]
(.toDataUrl js/window img (fn [res]
(swap! items #(conj % [res name]))
(swap! zips-atom #(-> %
(assoc-in [(:db/id item) :downloaded] (count @items))))
(func)
(do-zip))))
(let [res (<! c)]
View gist:d6f49c83246616d537e3c393d501dfc8
(doall
(map (fn [[img name]]
(let [c (chan)]
(go
(.toDataUrl js/window img (fn [res]
(swap! items #(conj % [res name]))
(go
(>! c "CALLBACK"))
(do-zip)))
(let [res (<! c)]
You can’t perform that action at this time.