Skip to content

Instantly share code, notes, and snippets.

@harpo
harpo / consumer.sh
Created October 17, 2017 12:37 — 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 kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1

Keybase proof

I hereby claim:

  • I am harpo on github.
  • I am nutcracker (https://keybase.io/nutcracker) on keybase.
  • I have a public key whose fingerprint is FF40 2D73 6C24 04A9 66C9 0D5B 4160 0126 B5EF 9478

To claim this, I am signing this object:

@harpo
harpo / 0_reuse_code.js
Created September 28, 2015 09:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@harpo
harpo / xlsx2xls.vbs
Created May 12, 2014 13:36
XLSX->XLS conversion script by Michael Kuzmin
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(Wscript.Arguments(0))
objExcel.Application.Visible = False
objExcel.Application.DisplayAlerts = False
objExcel.ActiveWorkbook.SaveAs Wscript.Arguments(1), 56
objExcel.ActiveWorkbook.Close
objExcel.Application.DisplayAlerts = True
objExcel.Application.Quit
WScript.Quit
' XLSX->XLS conversion script by Michael Kuzmin
@harpo
harpo / sysinfo.py
Created May 12, 2014 13:35
simple script to give a summary of system information
#/bin/sh
# simple script to give a summary of system information
# License: LGPLv2
# Author:
# http://www.pixelbeat.org/
# Notes:
# Unless you run as root, disk info can't be shown
# Changes:
@harpo
harpo / jboss.sh
Created May 12, 2014 13:34
JBoss auto start-stop script
#!/bin/sh
#chkconfig: 345 99 10
#description: JBoss auto start-stop script.
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
@harpo
harpo / ps_mem.py
Created May 12, 2014 13:34
determine how much RAM is currently being used per program
#!/usr/bin/env python
# Try to determine how much RAM is currently being used per program.
# Note per _program_, not per process. So for example this script
# will report RAM used by all httpd process together. In detail it reports:
# sum(private RAM for program processes) + sum(Shared RAM for program processes)
# The shared RAM is problematic to calculate, and this script automatically
# selects the most accurate method available for your kernel.
# Licence: LGPLv2
@harpo
harpo / dutop.py
Created May 12, 2014 13:33
Show top disk space users in current directory
#!/usr/bin/env python
# Show top disk space users in current directory,
# while automatically recursing down directories if
# there is one obvious directory using the space.
# License: LGPLv2
# Author: [email protected]
#Design decisions:
#!/bin/bash
#
# Beschreibung: Skript zum Gzippen und Verschieben von Logs
# aus /source/dir nach /target/dir
#
############################################
USAGE="
syntax: $0 -f <filter> -s <source dir> -d <destination dir> -n
$0 -f jboss.log.20 -s /swan/log -d /swan/log/old -n 1