Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
nha / client_log.txt
Last active Jul 15, 2021
View client_log.txt
#error {
:cause Connection refused
[{:type org.apache.pulsar.client.api.PulsarClientException
:message java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException:$AnnotatedConnectException: Connection refused: /
:at [org.apache.pulsar.client.api.PulsarClientException unwrap 1027]}
{:type java.util.concurrent.ExecutionException
:message org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException:$AnnotatedConnectException: Connection refused: /
:at [java.util.concurrent.CompletableFuture reportGet 395]}
{:type org.apache.pulsar.client.api.PulsarClientException
nha / index.html
Created Oct 19, 2019 — forked from CodeMyUI/index.html
Learning Three.js
View index.html
<div class =container> </div>
nha / hello_presto.clj
Last active May 13, 2019
presto clj exception bean
View hello_presto.clj
;; TO run:
;; - install clj
;; - start a clj REPL with presto: clojure -Sdeps '{:deps {com.facebook.presto/presto-jdbc {:mvn/version "0.219"}}}'
;; - copy-paste this gist content
(ns hello-presto
(:import [java.util Date]
[com.facebook.presto.jdbc.internal.client FailureInfo FailureInfo$FailureException]))
(println "Date bean:" (bean (Date.)))
nha /
Created Jul 13, 2018 — forked from kachayev/
Parsing CSS file with monadic parser in Clojure
nha / gh-validation.clj
Created Jun 20, 2018 — forked from ska2342/gh-validation.clj
Some code for a ring middleware written in Clojure to validate Github webhook calls
View gh-validation.clj
;; (c) 2016 Stefan Kamphausen
;; Released under the Eclipse Public License as is common in the Clojure world.
;;; Summary
;; This gist shows how you can implement GitHub webhook validation as a Clojure ring middleware.
;;; Description
;; It is not a ready-made solution that you can just plug into your code. It makes some assumptions that
;; may or may not be valid in your situation. I don't want to turn this into a full-blown generic
;; open source library because of this. Instead I provide this gist so that you can take the parts
nha /
Created Apr 8, 2018 — forked from mfikes/
Keywords in ClojureScript React Native Hiccup

Instead of using vars in React Native Hiccup, it would be interesting to use keywords.

Consider the way things are currently done:

(def ReactNative (js/require "react-native"))
(def text (r/adapt-react-class (.-Text ReactNative)))

(defn greeting []
 [text "Hello"])
View truffle-in-clojure.clj
(ns morel.core
(:import ( RootNode NodeInfo Node$Child))
(:require [clojure.interop :refer [defclass]]
[clojure.reflect :as reflect]))
^{NodeInfo {:language "SL"
:description "The root of all SL execution trees"}}
SLRootNode [language
nha /
Created Mar 23, 2018 — forked from harfangk/
Rich Hickey Interview with Fogus on CodeQuarterly (likely from around June 2011)

The original website containing this interview has disappeared. I've googled a bit to find this transcript. I'm saving it myself to provide another link to the great interview and preserve it.

Rich Hickey Q&A by Michael Fogus

Best known as the inventor of Clojure, a Lisp that runs on the Java Virtual Machine and the first new member of the Lisp family to attract any widespread interest since Scheme and Common Lisp, Rich Hickey has been a software developer and consultant for two decades.

Prior to starting work on Clojure, he made four attempts to combine Lisp with either Java or Microsoft’s Common Language Runtime: jfli, Foil, Lisplets, and DotLisp but Clojure was the first to draw significant attention. To date there have been four books published on Clojure, including The Joy of Clojure by interviewer Michael Fogus. The first Clojure conference, ClojureConj held in 2010, drew over two hundred attendees. And the Clojure Google group has, as of this writing, 4,880 members who have posted over 46,000 mes