Skip to content

Instantly share code, notes, and snippets.

Robin Moffatt rmoff

Block or report user

Report or block rmoff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rmoff /
Created May 1, 2019
Show status of all Kafka Connect connectors
curl -s "http://localhost:8083/connectors"| \
jq '.[]'| \
xargs -I{connector_name} curl -s "http://localhost:8083/connectors/"{connector_name}"/status" | \
jq -c -M '[.name,.connector.state,.tasks[].state]|join(":|:")' | \
column -s : -t | \
sed 's/\"//g' | \
rmoff / gist:c3db21aae4b9232b07699fbe07e10d68
Created Mar 13, 2019
Neo4j/twitter Kafka Connect demo
View gist:c3db21aae4b9232b07699fbe07e10d68
= Testing the Neo4j Connector with Twitter as a source of data
Caveat: I have never used Neo4j before. I'm familiar with the general concept of a property graph though.
== Start here
Create a Twitter source
View example.pcap
"timestamp": "1547735265961",
"layers": {
"frame": {
"frame_frame_interface_id": "0",
"frame_interface_id_frame_interface_name": "en0",
"frame_frame_encap_type": "1",
"frame_frame_time": "Jan 17, 2019 14:27:45.961581000 GMT",
"frame_frame_offset_shift": "0.000000000",
"frame_frame_time_epoch": "1547735265.961581000",
rmoff / connect-jdbc-driver.adoc
Last active Jan 15, 2019
JDBC Driver installation with Confluent CLI
View connect-jdbc-driver.adoc

JDBC Driver installation with Confluent CLI

Install Confluent Platform

  1. Go to and download 5.1

  2. Move and unpack it:

    $ mv ~/Downloads/confluent-5.1.0-2.11.tar.gz ~/cp/
rmoff /
Last active Oct 23, 2019
Kafka Connect JDBC connector - numeric.mapping
rmoff / docker-compose.yml
Last active Sep 3, 2019
Docker-Compose for Kafka and Zookeeper with internal and external listeners
View docker-compose.yml
version: '2'
image: confluentinc/cp-zookeeper:latest
View ksql null workaround.ksql
# Set up some sample data:
docker run --interactive --rm --network ksql-troubleshooting_default \
confluentinc/cp-kafkacat \
kafkacat -b kafka:29092 \
-t topic_with_nulls \
-P <<EOF
rmoff / ksql-asciinema.adoc
Last active Sep 17, 2018
Recording Docker container sessions with asciinema
View ksql-asciinema.adoc
asciinema rec \
    --idle-time-limit 1 \
    -c "docker run --network ksql-troubleshooting_default --interactive --tty --rm confluentinc/cp-ksql-cli:5.0.0 http://ksql-server:8088" \
rmoff / decoding-json-with-jq.adoc
Created Jul 5, 2018
How to view a schema's JSON representation from the Confluent Schema Registry (Decoding encoded JSON with jq)
View decoding-json-with-jq.adoc

Confluent Schema Registry supports REST to pull down schema definitions:

$ curl -s localhost:8081/subjects/asgard.demo.CUSTOMERS-raw-value/versions/latest


Keybase proof

I hereby claim:

  • I am rmoff on github.
  • I am rmoff ( on keybase.
  • I have a public key ASB2fZAiJ83jDPiOrWiKXYzkweNEpmaZx9U1hsiJxtpGEgo

To claim this, I am signing this object:

You can’t perform that action at this time.