Skip to content

Instantly share code, notes, and snippets.

View nha's full-sized avatar
🐢
https://turtlequeue.com

nha

🐢
https://turtlequeue.com
View GitHub Profile
@nha
nha / client_log.txt
Last active July 15, 2021 08:13
pulsar_proxy_local
#error {
:cause Connection refused
:via
[{:type org.apache.pulsar.client.api.PulsarClientException
:message java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:6660
:at [org.apache.pulsar.client.api.PulsarClientException unwrap PulsarClientException.java 1027]}
{:type java.util.concurrent.ExecutionException
:message org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:6660
:at [java.util.concurrent.CompletableFuture reportGet CompletableFuture.java 395]}
{:type org.apache.pulsar.client.api.PulsarClientException
@nha
nha / index.html
Created October 19, 2019 21:25 — forked from CodeMyUI/index.html
Learning Three.js
<div class =container> </div>
@nha
nha / esnextbin.md
Last active August 5, 2019 18:11
esnextbin sketch
@nha
nha / hello_presto.clj
Last active May 13, 2019 11:16
presto clj exception bean
;; 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
nha / esnextbin.md
Last active May 12, 2019 23:00
esnextbin sketch
@nha
nha / css-parser.md
Created July 13, 2018 15:17 — forked from kachayev/css-parser.md
Parsing CSS file with monadic parser in Clojure
@nha
nha / gh-validation.clj
Created June 20, 2018 09:42 — forked from ska2342/gh-validation.clj
Some code for a ring middleware written in Clojure to validate Github webhook calls
;; (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
nha / README.md
Created April 8, 2018 09:17 — forked from mfikes/README.md
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"])
(ns morel.core
(:import (com.oracle.truffle.api.nodes RootNode NodeInfo Node$Child))
(:require [clojure.interop :refer [defclass]]
[clojure.reflect :as reflect]))
(defclass
^{NodeInfo {:language "SL"
:description "The root of all SL execution trees"}}
SLRootNode [language
frame-descriptor
@nha
nha / rich_hickey_fogus_interview.md
Created March 23, 2018 12:50 — forked from harfangk/rich_hickey_fogus_interview.md
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