This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lein deps :tree | |
Possibly confusing dependencies found: | |
[org.apache.kafka/kafka_2.11 "0.10.0.1"] | |
overrides | |
[io.confluent/kafka-schema-registry "3.0.1"] -> [org.apache.kafka/kafka_2.11 "0.10.0.1-cp1"] | |
Consider using these exclusions: | |
[io.confluent/kafka-schema-registry "3.0.1" :exclusions [org.apache.kafka/kafka_2.11]] | |
[org.apache.kafka/kafka-clients "0.10.0.1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lein deps :tree | |
[ch.qos.logback/logback-classic "1.1.1" :scope "test"] | |
[ch.qos.logback/logback-core "1.1.1" :scope "test"] | |
[clj-http "2.3.0" :scope "test"] | |
[commons-codec "1.10" :scope "test" :exclusions [[org.clojure/clojure]]] | |
[commons-io "2.5" :scope "test" :exclusions [[org.clojure/clojure]]] | |
[org.apache.httpcomponents/httpclient "4.5.2" :scope "test" :exclusions [[org.clojure/clojure]]] | |
[commons-logging "1.2" :scope "test"] | |
[org.apache.httpcomponents/httpcore "4.4.5" :scope "test" :exclusions [[org.clojure/clojure]]] | |
[org.apache.httpcomponents/httpmime "4.5.2" :scope "test" :exclusions [[org.clojure/clojure]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn holdings-manager | |
"Returns a collection of kstreams, one for each different way in which | |
loan ownership state may be updated" | |
[puma-events] | |
(let [ownership-store (k/store "loan-ownership")] | |
(-> (k/kstream puma-events) | |
(k/transform (update-ownership ownership-store)) | |
(k/branch [trade-result? | |
repayment-result?]))]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tweet-published | |
id | |
user-id | |
msg | |
unique-key: id | |
partition-key: id | |
record-key: ? | |
user-mentioned | |
id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# traditional way to run program via lein | |
$ time lein run -m clojure.main -e '(println "yolo")' | |
yolo | |
real 0m6.678s | |
user 0m9.845s | |
sys 0m0.961s | |
# new clojure script (supported by tools.deps.alpha) | |
# in this test, we force clojure to compute the classpath before running the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function cleanup () { | |
docker rm -f $pg >/dev/null | |
} | |
trap cleanup EXIT | |
PARAMS="" | |
while (( "$#" )); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cddr.avro2ddl | |
(:require | |
[clojure.string :as string] | |
[clojure.java.io :as io] | |
[clojure.data.json :as json]) | |
(:gen-class)) | |
(def home (System/getProperty "user.home")) | |
(def loan (-> (format "%s/Projects/avro-schemas/schemas/loan-3.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def client-impl | |
{:alter-topics* (fn [this topics] | |
(d/future | |
(->> (.alterConfigs this topics) | |
.all deref))) | |
:create-topics* (fn [this topics] | |
(d/future | |
(->> (.createTopics this topics) | |
.all deref))) | |
:delete-topics* (fn [this topics] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Saturday 31 August 2019 | |
Dear Stephen Kerr, | |
Can you please just look at the devastation and anxiety you are causing thousands of innocent people around the UK. How can you sleep at night knowing that you have caused this? And for what? | |
https://uk.reuters.com/article/uk-britain-eu-immigration-insight/where-do-i-go-eu-citizens-face-legal-limbo-after-decades-in-britain-idUKKCN1VK0CV | |
I know first-hand how much it costs to move overseas, not only financially but emotionally and physically. I am beyond rage at this point on behalf of the friends and colleagues who have come to this country to improve our health service, build our houses, cook our food, develop our IT systems and so on. Each day I read stories about the impossible situation we have put these people in. They would like to stay here but they simply do not know whether they will be allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mock-avro-example | |
(:require | |
[clojure.data.json :as json] | |
[jackdaw.streams :as k] | |
[jackdaw.serdes.avro :as avro] | |
[jackddaw.serdes.avro.schema-registry :as reg] | |
[jackdaw.test :as jdt])) | |
(def foo-schema | |
{:type :record |