Skip to content

Instantly share code, notes, and snippets.

@lawulu
lawulu / cli.md
Last active November 5, 2018 07:41 — forked from phrawzty/2serv.py
simple http server to dump request headers

Python3 version & added respone

$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python serv.py
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
@lawulu
lawulu / consumer.sh
Last active February 13, 2019 04:24 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper prod-us-kafka1:2181,prod-us-kafka2:2181,prod-us-kafka3:2181 \
--messages 15000000 \
--threads 1
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select