Skip to content

Instantly share code, notes, and snippets.

Jacob O'Bryant jacobobryant

Block or report user

Report or block jacobobryant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jacobobryant /
Last active Nov 18, 2019
common vim commands
j k h l
b B w W
C-u C-d ("control-u")
gg G 10G
C-e C-f
0 $
C-o <tab>
jacobobryant /
Last active Jul 13, 2019
Better logs for Datomic Cloud Ions

You may discover soon after adding logging to your Ions that CloudWatch really sucks. Fortunately you can forward your logs to Loggly instead. See here.

jacobobryant /
Last active Jul 10, 2019
Modifying Datomic schema for composite tuples

Say you define a composite tuple like so:

#:db{:ident :foo,
     :valueType :db.type/tuple,
     :unique :db.unique/identity,
     :tupleAttrs [:bar :baz],
     :cardinality :db.cardinality/one}

Now suppose you want to change [:bar :baz] to [:bar :quux]. The [Datomic

jacobobryant /
Last active Jun 12, 2019
refreshing namespaces breaks *data-readers*

If you call before requiring any namespaces referenced in data_readers.clj, then *data-readers* gets messed up somehow. The readers you define in data_readers.clj won't work even if you require their namespaces. For example:

$ find -type f
jacobobryant /
Last active May 24, 2019
tools.deps bug with :local/root?

On a project I'm working on, this gives me an error:

$ clj -Sdeps '{:deps {trident/build {:local/root "/home/arch/dev/trident/target/build"}}}' \
>     -m reset
Exception in thread "main" Syntax error compiling at (trident/build/util.clj:1:1).
Caused by: java.lang.ClassNotFoundException: jnr.posix.POSIXFactory

(I have (:import (jnr.posix POSIXFactory))) in that file).

jacobobryant / deploy.cljs
Created May 10, 2019
Script for automating Datomic Cloud Ion push + deploy
View deploy.cljs
(ns deploy.core
(:require [cljs.reader :refer [read-string]]
[ :as shell]))
(defn sh [& args]
(let [result (apply shell/sh args)]
(if (= 0 (:exit result))
(:out result)
(throw (ex-info (:err result) {})))))
You can’t perform that action at this time.