Skip to content

Instantly share code, notes, and snippets.

@mitch-seymour
mitch-seymour / README.md
Created November 13, 2015 20:30 — forked from donaldh/README.md
force-multi-foci with convex hulls

I have modified the force-multi-foci example to add a convex hull around each cluster of nodes.

I achieved this by using d3.nest() to create a new dataset of clusters containing the nodes in each cluster. Then in the tick() method I create and update the path element for each cluster in this dataset.

@mitch-seymour
mitch-seymour / .block
Last active March 7, 2016 01:17
DataMaps - fading bubbles plugin
height: 700
license: mit
@mitch-seymour
mitch-seymour / .block
Last active March 14, 2016 20:49
Geodesic satellites
height: 660
license: mit
class StreamsApp {
// properties, methods, etc
public void forceInitializationOfStateStore(Map<String, Object> config, String sourceTopic, Deserializer keyDeserializer, Deserializer valueDeserializer) {
config.put(ENABLE_AUTO_COMMIT_CONFIG, true);
KafkaConsumer<String, String> consumer = new KafkaConsumer<>(config, keyDeserializer, valueDeserializer);
ConsumerRebalanceListener listener = new ConsumerRebalanceListener() {
public void onPartitionsRevoked (Collection< TopicPartition > partitions) {}
public void onPartitionsAssigned (Collection < TopicPartition > partitions) {
List<TopicPartition> unInitialized = new ArrayList<>();
@mitch-seymour
mitch-seymour / guest-blog-post-proposal-confluent.md
Last active April 8, 2019 01:58
Proposal for a guest post to Confluent's blog

Guest blog post proposal

I'd love to contribute a guest blog post to highlight a simpler method for getting started with KSQL UDFs / UDAFs. We would need to merge [KSQL #2272][pr] first, potentially add a closing section to this article, and get the content reviewed by Confluent of course :)

Author Mitch Seymour
@mitch-seymour
mitch-seymour / README.md
Last active December 16, 2019 17:33
Avro!

Make sure you have avro-tools installed.

brew install avro-tools

# or...
mvn dependency:get -Dartifact=org.apache.avro:avro-maven-plugin:1.8.2
cp ~/.m2/repository/org/apache/avro/avro-tools/1.8.2/avro-tools-1.8.2.jar /usr/local/bin/avro-tools
# no args example
$ ./build/graal/hello-world
# output
Hello world :)
# args example
$ ./build/graal/hello-world --help
# output
dependencies {
compile 'info.picocli:picocli:4.1.0'
annotationProcessor 'info.picocli:picocli-codegen:4.1.0'
// ...
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
# create a new project directory
$ mkdir graal-cli-example && cd graal-cli-example
# init a new project
$ gradle init \
--type java-application \
--dsl groovy \
--test-framework junit-jupiter \
--project-name hi \
--package com.mitchseymour.hi
# verify that it can be built / executed
$ ./gradlew run
# output
> Task :run
Hello world.