Skip to content

Instantly share code, notes, and snippets.

View functicons's full-sized avatar
🎯
Focusing

Dagang Wei functicons

🎯
Focusing
View GitHub Profile
@functicons
functicons / GitHub-Forking.md
Created May 9, 2018 18:16 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@functicons
functicons / ExtractOriginalMethodNameFromReferenceExample.java
Created June 1, 2018 22:24 — forked from thomasdarimont/ExtractOriginalMethodNameFromReferenceExample.java
One can use a SerializedLambda to unreflect the actual method referred to by a MethodReference
package de.tdlabs.training.hacks;
import java.io.Serializable;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Supplier;
import static java.util.Arrays.asList;
@functicons
functicons / ExtractOriginalMethodNameFromReferenceExample.java
Created June 1, 2018 22:25 — forked from thomasdarimont/ExtractOriginalMethodNameFromReferenceExample.java
One can use a SerializedLambda to unreflect the actual method referred to by a MethodReference
package de.tdlabs.training.hacks;
import java.io.Serializable;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Supplier;
import static java.util.Arrays.asList;
@functicons
functicons / benchmark-commands.txt
Created December 27, 2018 05:37 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@functicons
functicons / WordCount.scala
Created December 30, 2018 06:28 — forked from miguno/WordCount.scala
WordCount application in Scala 2.11+, using Kafka's Streams API (Kafka version 0.11.0.0)
import java.lang.Long
import java.util.Properties
import java.util.concurrent.TimeUnit
import org.apache.kafka.common.serialization._
import org.apache.kafka.streams._
import org.apache.kafka.streams.kstream.{KStream, KStreamBuilder, KTable}
import scala.collection.JavaConverters.asJavaIterableConverter