Skip to content

Instantly share code, notes, and snippets.

View gist:bd9995a2fcae22f51c458946485d6651
### Keybase proof
I hereby claim:
* I am arohner on github.
* I am arohner ( on keybase.
* I have a public key ASDBb6_DdjJJsU7SDLNwjCHqnyvRDgmULf_nDTu9-RWpLQo
To claim this, I am signing this object:
arohner / google-api.clj
Created Nov 5, 2016
Clojure example of accessing google APIs directly
View google-api.clj
(:require [cemerick.url :as url]
[cheshire.core :as json]
[clj-jwt.core :as jwt]
[clj-jwt.key :as key]
[clj-time.core :as time]
[clj-http.client :as http]
[clojure.string :as str])
View gist:72c9c212d12a1b226fd6
{:user {:mirrors {#"clojars" {:name "tcrawley"
:url ""}}
arohner / gist:77deaf47503c73654493
Last active Aug 29, 2015
core.typed & pedestal tools.analyzer.jvm conflict
View gist:77deaf47503c73654493
(defn- go-async
"When presented with a channel as the return value of an enter function,
wait for the channel to return a new-context (via a go block). When a new
context is received, restart execution of the interceptor chain with that
This function is non-blocking, returning nil immediately (a signal to halt
further execution on this thread)."
[old-context context-channel]
(prepare-for-async old-context)
arohner / gist:d7a6bb057824c224b5b3
Created May 25, 2015
rudimentary core.typed datomic annotations
View gist:d7a6bb057824c224b5b3
;;; Extremely incomplete type annotations for Datomic.
(ns foo.util.type.datomic
(:require [clojure.core.typed :as t]
[datomic.api :as d])
(:import (datomic Connection
(datomic.db DbId)
(java.util Date UUID)))
View gist:70596d1ca051a94de83d
(:require []
[clojure.core.typed :as t :refer (ann)])
(:import ( LoggerFactory Logger)
(clojure.lang Namespace
(ann ^:no-check*logger-factory* LoggerFactory)
(ann ^:no-check (t/Fn [LoggerFactory (t/U clojure.lang.Symbol Namespace) ->]))
(ann ^:no-check (t/Fn [Logger t/Keyword -> Boolean]))
View gist:03b60a9de3282e970deb duplicate entry: WEB-INF/lib/tagsoup-1.2.1.jar
at (
java.util.jar.JarOutputStream.putNextEntry (
sun.reflect.GeneratedMethodAccessor78.invoke (:-1)
sun.reflect.DelegatingMethodAccessorImpl.invoke (
java.lang.reflect.Method.invoke (
clojure.lang.Reflector.invokeMatchingMethod (
clojure.lang.Reflector.invokeInstanceMethod (
leiningen.ring.war$write_entry.invoke (war.clj:185)
leiningen.ring.war$file_entry.invoke (war.clj:201)
View gist:c5e0fa45229c408301e2
(defn wrap-reloading [{:keys [reloading?] :as args}]
(if reloading?
(fn [req]
((#'handler args) req))
(handler args)))
arohner / gist:e8b839ea82ce78aed7a0
Created Feb 20, 2015
cljs foreign libs weirdness
View gist:e8b839ea82ce78aed7a0
Uncaught Error: Undefined nameToPath for com.bootstrapbase.js:739
(anonymous function)
:cljsbuild {:builds {:dev {:source-paths ["src/cljs"]
:compiler {:output-to "dev-resources/public/js/app.js"
:output-dir "dev-resources/public/js/"
View gist:566f7811ce30dd295b51
public class LaunchAtStartup : NSObject
public class func enumerateLaunchItems()
let loginItemsRef = LSSharedFileListCreate(nil, kLSSharedFileListSessionLoginItems.takeUnretainedValue(), nil).takeUnretainedValue()
var itemUrl:NSURL?