Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am spieden on github.
  • I am spieden (https://keybase.io/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
(spr/cond-path
#(and (vector? %)
(tags (first %)))
spr/STAY
FROM openjdk:8u121-jdk-alpine
RUN apk update && apk add curl bash
ADD https://private/url/for/datomic-pro.zip /datomic-pro.zip
RUN mkdir /datomic && unzip /datomic-pro.zip -d /datomic
ADD go.sh /go.sh
RUN chmod 755 /go.sh
import clojure.lang.Delay;
import java.io.IOException;
import java.io.InputStream;
/**
* 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 (java.io IOException StringWriter)
(java.util.concurrent ExecutionException)))
(defn start-step! [upstream step]
(let [prev-step (-> upstream last)
{:user
{: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.tools.namespace.repl/refresh 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 [clojure.data :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)
pairs))
@spieden
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)
"world"
; .. 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)')