Skip to content

Instantly share code, notes, and snippets.

Avatar

Tyler van Hensbergen tvanhens

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am tvanhens on github.
  • I am tvanhens (https://keybase.io/tvanhens) on keybase.
  • I have a public key ASDpjL7vC-bkAPHy-pTLdtJhrVYJh6duP0Pzclo3XOkHvAo

To claim this, I am signing this object:

View gist:362101dc324606ecc94bc32683d1741b
java.lang.NullPointerException
at clojure.core$deref_future.invokeStatic(core.clj:2208)
at clojure.core$deref.invokeStatic(core.clj:2228)
at clojure.core$deref.invoke(core.clj:2214)
at cljs.analyzer$get_namespace.invokeStatic(analyzer.cljc:502)
at cljs.analyzer$get_namespace.invoke(analyzer.cljc:498)
at cljs.analyzer$get_namespace.invokeStatic(analyzer.cljc:500)
at cljs.analyzer$get_namespace.invoke(analyzer.cljc:498)
at cljs.repl$repl_STAR_$read_eval_print__21336.invoke(repl.cljc:910)
at cljs.repl$repl_STAR_$fn__21342$fn__21351.invoke(repl.cljc:958)
View dispatch.clj
(defmulti dispatch* (fn [kw args] kw))
(defmethod dispatch* :user/username
[_ _]
"tvanhens")
(defn dispatch
"Dispatches a query to its multimethod implementation."
[message]
(apply dispatch* message))
View b64.clj
user> (import '[java.util Base64])
;; java.util.Base64
user> (.encodeToString (Base64/getEncoder) (byte-array (map byte "Hello")))
;; "SGVsbG8="
View gist:a48b60befcb70af79aa230b721ae54db
(ns example.core
(:require [goog.dom :as gdom]
[om.dom :as dom]
[om.next :as om :refer-macros [defui]]))
(defmulti read om/dispatch)
(def parse (om/parser {:read read}))
(defmethod read :default
@tvanhens
tvanhens / game_test.clj
Last active May 25, 2016
Trying to write a failing test with check-var
View game_test.clj
(ns blackjack.game-test
(:require [clojure.spec :as s]
[clojure.spec.test :as test]))
(def suits #{:hearts :diamonds :clubs :spades})
(def ranks (into #{:ace :king :queen :jack} (range 2 11)))
(def cards (for [rank ranks suit suits] [rank suit]))
View core.cljs
(ns ^:figwheel-always om-next-fun.core
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[goog.dom :as gdom]))
(enable-console-print!)
(defonce init-data
(atom {:dashboard/items
[{:id 0 :type :dashboard/post
View gist:f929f4bf7e861b2c1a76
(ns ^:figwheel-always om-next-fun.core
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[goog.dom :as gdom]))
(enable-console-print!)
(defonce init-data
(atom {:dashboard/items
[{:id 0 :type :dashboard/post
View example.clj
onyx-batch-fix.jobs.sample-job-test> (clojure.test/run-tests 'onyx-batch-fix.jobs.sample-job-test)
Testing onyx-batch-fix.jobs.sample-job-test
Starting Onyx development environment
;; LOGS:
λ ~/code/personal/onyx-batch-fix/ master tail -f onyx.log
15-Jul-31 18:58:39 Tylers-MBP.home INFO [onyx.static.logging-configuration] - Starting Logging Configuration
15-Jul-31 18:58:39 Tylers-MBP.home INFO [onyx.log.zookeeper] - Starting ZooKeeper server
View gist:5dbad8ccdf11504a8146
error in process sentinel: Could not start nREPL server: Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: java.io.FileNotFoundException: Could not locate taoensso/timbre__init.class or taoensso/timbre.clj on classpath., compiling:(onyx/peer/operation.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7239)
at clojure.lang.RT.loadResourceScript(RT.java:371)
at clojure.lang.RT.loadResourceScript(RT.java:362)
at clojure.lang.RT.load(RT.java:446)
at clojure.lang.RT.load(RT.java:412)
at clojure.core$load$fn__5448.invoke(core.clj:5866)
at clojure.core$load.doInvoke(core.clj:5865)