View NettyByteString.java
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
package com.google.protobuf; | |
import io.netty.buffer.ByteBuf; | |
import java.io.*; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.nio.InvalidMarkException; | |
import java.nio.charset.Charset; | |
import java.util.Collections; |
View fix-idea.sh
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 | |
xml='<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> | |
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" /> | |
<excludeFolder url="file://$MODULE_DIR$/checkouts" /> | |
<excludeFolder url="file://$MODULE_DIR$/target" /> | |
</content>' |
View metrics
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
# HELP otelcol_exporter_queue_size Current size of the retry queue (in batches) | |
# TYPE otelcol_exporter_queue_size gauge | |
otelcol_exporter_queue_size{exporter="otlp",service_instance_id="0afa6250-8064-4913-9a60-fe23ae50dd52"} 0 | |
# HELP otelcol_exporter_send_failed_spans Number of spans in failed attempts to send to destination. | |
# TYPE otelcol_exporter_send_failed_spans counter | |
otelcol_exporter_send_failed_spans{exporter="logging",service_instance_id="0afa6250-8064-4913-9a60-fe23ae50dd52"} 0 | |
otelcol_exporter_send_failed_spans{exporter="otlp",service_instance_id="0afa6250-8064-4913-9a60-fe23ae50dd52"} 675 | |
# HELP otelcol_exporter_sent_spans Number of spans successfully sent to destination. | |
# TYPE otelcol_exporter_sent_spans counter | |
otelcol_exporter_sent_spans{exporter="logging",service_instance_id="0afa6250-8064-4913-9a60-fe23ae50dd52"} 1.974518e+06 |
View interceptors.clj
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 fn-1arity [one-arg] | |
(inc one-arg)) | |
(defn fn-future [res] | |
(d/future | |
(Thread/sleep 1000) | |
res)) | |
(defn fn-2arity [a b] |
View either.clj
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
(require '[clojure.spec.alpha :as s]) | |
(s/def ::test (s/and (s/keys :req-un [(or ::key1 ::key2)]) | |
(fn [{:keys [key1 key2]}] | |
(not (and key1 key2))))) | |
;; s/or validates some of the keys | |
;; the (fn..) ensures that both keys CANNOT be present |
View manifold.clj
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
(d/on-realized (d/chain (d/success-deferred 1) | |
#(println "ok" %)) | |
(fn ok [v] (println "Realized" v)) | |
(fn fail [e] (println "fail " e))) | |
;; ok 1 | |
;; realized nil | |
(d/on-realized (d/chain (d/error-deferred 1) | |
#(println "ok" %)) | |
(fn ok [v] (println "Realized" v)) |