Skip to content

Instantly share code, notes, and snippets.

View dcj's full-sized avatar

Don Jackson dcj

View GitHub Profile
@dcj
dcj / pg.clj
Created October 12, 2020 23:44
Coercing between Clojure and Postgres/PostGIS
(ns coerce.jdbc.pg
(:require
[clojure.string :as string]
[java-time :as time]
[next.jdbc :as jdbc]
[next.jdbc.connection :as connection]
[next.jdbc.result-set :as result-set]
[next.jdbc.prepare :as prepare]
[geo.io]
[cheshire.core :as json]

Keybase proof

I hereby claim:

  • I am dcj on github.
  • I am dcjackson (https://keybase.io/dcjackson) on keybase.
  • I have a public key ASBO7Ma9UBqa7g0ITq821DWuCpyoUUUB1GojlM_UZgfNdQo

To claim this, I am signing this object:

@dcj
dcj / test.clj
Created August 8, 2012 22:24 — forked from pepijndevos/test.clj
Alternative implementation of clojure.core/seque
(ns test
(:import [java.util.concurrent
BlockingQueue
LinkedBlockingQueue
SynchronousQueue
PriorityBlockingQueue
CyclicBarrier])
(:use clojure.test)
(:refer-clojure :exclude [seque]))
@dcj
dcj / test-trace.clj
Created February 16, 2012 18:52
My take on tracing
(ns testtrace
(:use clojure.tools.trace
clojure.contrib.pprint))
(defn trace-fn
([fun-sym] (trace-fn *ns* fun-sym))
([ns fun-sym]
(let [sym (if (symbol? fun-sym)
fun-sym
(:name (meta fun-sym)))
@dcj
dcj / StormBuildLion
Created September 19, 2011 20:42
Getting Storm to build on Mac OS X Lion
Note: When I started, JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
$ git clone https://github.com/nathanmarz/jzmq.git
Cloning into jzmq...
remote: Counting objects: 611, done.
remote: Compressing objects: 100% (204/204), done.
remote: Total 611 (delta 317), reused 570 (delta 292)
Receiving objects: 100% (611/611), 304.06 KiB | 298 KiB/s, done.
Resolving deltas: 100% (317/317), done.