Skip to content

Instantly share code, notes, and snippets.

View alexwen's full-sized avatar

Alex Wenckus alexwen

View GitHub Profile
@ggtools
ggtools / logstash.conf
Last active October 12, 2017 21:05
Logstash configuration for Docker + Spring Boot applications
input {
gelf {
type => docker
port => 12201
}
}
filter {
multiline {
pattern => "^%{TIMESTAMP_ISO8601}"
@rantav
rantav / AwsClientMetricsCollector.java
Created November 9, 2014 13:08
Collecting AWS client metrics into codahale metrics, in java
package ...;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.amazonaws.Request;
@okcpt
okcpt / CRC16Modbus.java
Created October 14, 2013 16:39
CRC16 MODBUS
package utils;
import java.util.zip.Checksum;
/**
* User: punksa
* Date: 13-10-11
* Time: 下午10:33
*/
@asmaier
asmaier / KafkaProducerIT.java
Last active March 23, 2022 11:16
Simple java junit test of an apache kafka producer (works with Kafka 0.11.0.2) (see also https://github.com/asmaier/mini-kafka)
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Properties;
import org.I0Itec.zkclient.ZkClient;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;