Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
https://turtlequeue.com

nha

🐢
https://turtlequeue.com
View GitHub Profile
@nha
nha / client_log.txt
Last active Jul 15, 2021
pulsar_proxy_local
View client_log.txt
#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 Oct 19, 2019 — forked from CodeMyUI/index.html
Learning Three.js
View index.html
<div class =container> </div>
@nha
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
nha / css-parser.md
Created Jul 13, 2018 — forked from kachayev/css-parser.md
Parsing CSS file with monadic parser in Clojure
View css-parser.md
@nha
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
nha / README.md
Created Apr 8, 2018 — forked from mfikes/README.md
Keywords in ClojureScript React Native Hiccup
View README.md

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 (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 Mar 23, 2018 — forked from harfangk/rich_hickey_fogus_interview.md
Rich Hickey Interview with Fogus on CodeQuarterly (likely from around June 2011)
View rich_hickey_fogus_interview.md

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