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 foo.core | |
(:require [compojure.core :refer :all] | |
[ring.mock.request :refer [request]])) | |
(defn foo [] | |
"I don't do a whole lot." | |
(context "/api" [] | |
(context "/users" [] | |
(context "/:user-id" [user-id] | |
(context "/contacts" [] |
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 foo.core | |
(:require [compojure.core :refer :all] | |
[ring.mock.request :refer [request]])) | |
(defn foo [] | |
"I don't do a whole lot." | |
(context "/api" [] | |
(context "/users" [] | |
(context "/:user-id" [user-id] | |
(context "/contacts" [] |
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
#=(eval | |
(-> (clojure.core/read-string (slurp "/home/malcolm/src/azondi/config.clj")) | |
((partial clojure.walk/postwalk | |
(fn [x] (if-let [path (and (string? x) (second (re-matches #"\.\./azondi(.*)" x)))] | |
(str "/home/malcolm/src/azondi" path) | |
x)))) | |
;; Comment these 3 | |
#_(update-in [:jig/components] dissoc |
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 autowire-dependencies-satisfying | |
"Return a dependency map, adding dependencies between the given | |
key (of the dependant) and any components in the given system map that | |
satisfy the given protocol." | |
[dependency-map system-map dependant-key proto] | |
(merge-with merge dependency-map (normalize-dependency-map {dependant-key (vec (keep (fn [[k v]] (when (satisfies? proto v) k)) (seq system-map)))}))) |
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
### Keybase proof | |
I hereby claim: | |
* I am malcolmsparks on github. | |
* I am malcolmsparks (https://keybase.io/malcolmsparks) on keybase. | |
* I have a public key whose fingerprint is D7EA C082 D28B C792 3327 9A32 06CE E45E C93B 3AF9 | |
To claim this, I am signing this object: |
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 perf.test | |
(:require | |
[org.httpkit.client :refer (request) :rename {request http-request}] | |
[clojure.core.async :refer (chan >! <! go go-loop)] | |
[clojure.core.match :refer (match)] | |
[ring.mock.request :refer (request) :rename {request mock-request}])) | |
(defn with-profiling [p & {:keys [callback]}] | |
(let [start (System/nanoTime) | |
dur (atom nil)] |
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
(defproject alephplay "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.7.0-alpha4"] | |
[aleph "0.4.0-alpha9" :exclusions [org.clojure/clojure]]]) | |
(ns alephplay.core |
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 alephplay.core | |
(:require | |
[aleph.http :as http] | |
[manifold.deferred :as d])) | |
(defn index [req] | |
(d/let-flow [status (future 200)] | |
{:status status :body "Hello World!"})) |
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
[malcolm@nessa eep]$ lein deps :tree | |
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel | |
warn | |
[cider/cider-nrepl "0.8.2-20141208.173909-2"] | |
[cljs-tooling "0.1.3" :exclusions [[org.clojure/clojure]]] | |
[compliment "0.2.0" :exclusions [[org.clojure/clojure]]] | |
[org.clojure/java.classpath "0.2.0" :exclusions [[org.clojure/clojure]]] | |
[org.clojure/tools.namespace "0.2.5" :exclusions [[org.clojure/clojure]]] | |
[org.clojure/tools.trace "0.7.8" :exclusions [[org.clojure/clojure]]] | |
[org.tcrawley/dynapath "0.2.3" :exclusions [[org.clojure/clojure]]] |
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
[malcolm@nessa eep]$ lein test | |
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel | |
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel | |
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". | |
SLF4J: Defaulting to no-operation (NOP) logger implementation | |
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. | |
lein test clojurewerkz.eep.emitter-test | |
Exception occured while processing :failure-is-expected-here : java.lang.String cannot be cast to java.lang.Number | |
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number |
OlderNewer