Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am spieden on github.
  • I am spieden ( on keybase.
  • I have a public key ASBLopsSTqJ7ydJ2lQkOPznkPwVaLQCZZ5Wmdn5TwF1rYQo

To claim this, I am signing this object:

(ns ncgl.datum-human-readable
(:require [ncgl.db.fixtures :as db-fxt]
[datomic.api :as d]))
(defn fixture []
(let [conn (db-fxt/make-test-conn)]
@(d/transact conn
[{:db/id "FOO"
:gene/hgnc-id "FOO"}
{:db/id "panel-id"
(ns hiccup-paths
(:require [com.rpl.specter :as spr]))
(def tags-recursive
(spr/recursive-path [tags] p
#(and (vector? %)
(tags (first %)))
FROM openjdk:8u121-jdk-alpine
RUN apk update && apk add curl bash
ADD https://private/url/for/ /
RUN mkdir /datomic && unzip / -d /datomic
RUN chmod 755 /
import clojure.lang.Delay;
* A lazily initialized InputStream using a Clojure delay.
* Construct with a delay that returns an InputStream. This delay will not be derefed until the
* DelayedInputStream is first accessed.
(ns shell
(:require [me.raynes.conch.low-level :as sh]
[slingshot.slingshot :refer [throw+ try+]]
[clojure.core.async :refer [go alts!!]]
[clojure.string :as str])
(:import ( IOException StringWriter)
(java.util.concurrent ExecutionException)))
(defn start-step! [upstream step]
(let [prev-step (-> upstream last)
{:dependencies [[alembic "0.3.2"] [org.clojure/tools.namespace "0.2.4"] [spyscope "0.1.5"]]
:plugins [[com.palletops/lein-shorthand "0.4.0"] [mvxcvi/whidbey "1.3.0"]]
:injections [(require 'spyscope.core)]
:shorthand {. [alembic.still/load-project alembic.still/distill alembic.still/lein clojure.test/run-tests clojure.test/run-all-tests
clojure.repl/doc clojure.repl/source clojure.repl/pst clojure.repl/dir]}}}
(ns cpdx.db.entity-patch
(:require [ :as data]
[slingshot.slingshot :refer [throw+]]))
(defn pair->assertion [verb id-ref [attr value]]
[verb id-ref attr value])
(defn make-assertions [verb id-ref pairs]
(map (partial pair->assertion verb id-ref)
spieden / hrm.clj
Last active November 30, 2015 21:20
; asserting cardinality many ref values using lookup refs appears not to work:
{:db/index true,
:db/unique :db.unique/identity,
:db/valueType :db.type/string,
:db/noHistory false,
:db/isComponent false,
:db.install/_attribute :db.part/db,
:db/fulltext false,
:db/cardinality :db.cardinality/one,
; I was able to export a static method I added to NSString with my protocol and category:
cljs.user=> (.hello js/NSString)
; .. but trying to do the same with a built-in method didn't work:
cljs.user=> (.stringWithContentsOfFilePathEncodingError js/NSString "/tmp/hello" NSUTF8StringEncoding nil)
undefined is not a function (evaluating 'NSString.stringWithContentsOfFilePathEncodingError("/tmp/hello",cljs.user.NSUTF8StringEncoding,null)')