Skip to content

Instantly share code, notes, and snippets.

yshadow / randomurl.go
Created Sep 6, 2017
Get random number from
View randomurl.go
package main
import (
const (
yshadow /
Created Jul 27, 2017
Delete old logstash storages
import urllib.request
from datetime import datetime, timedelta
import sys
server = ''
def delete_one(what):
"""Deletes one logstash storage"""
yshadow /
Last active Nov 29, 2016
MQTT Sender/Consumer
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class MQTTConsumer {
public static void main(String[] args) {
String topic = "sah/+/#";
yshadow /
Last active Nov 2, 2016
KTable - KTable problem
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.ByteArraySerializer;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.common.serialization.StringSerializer;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KStreamBuilder;
import org.apache.kafka.streams.kstream.KTable;
You can’t perform that action at this time.