I've been working with Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: ONTAP Firmware Upgrade | |
hosts: localhost | |
gather_facts: no | |
collections: | |
- netapp.ontap | |
vars_prompt: | |
- name: "ontap_admin_username" | |
private: no | |
prompt: "Enter your ONTAP admin username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .flake8 | |
# | |
# DESCRIPTION | |
# Configuration file for the python linter flake8. | |
# | |
# This configuration is based on the generic | |
# configuration published on GitHub. | |
# | |
# AUTHOR krnd | |
# VERSION v1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REG ADD HKLM\SYSTEM\CurrentControlSet\services\pvscsi\Parameters\Device /v DriverParameter /t REG_SZ /d "RequestRingPages=32,MaxQueueDepth=254" |
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SERVICE_NAME=MyService | |
PATH_TO_JAR=/usr/local/MyProject/MyJar.jar | |
PID_PATH_NAME=/tmp/MyService-pid | |
case $1 in | |
start) | |
echo "Starting $SERVICE_NAME ..." | |
if [ ! -f $PID_PATH_NAME ]; then | |
nohup java -jar $PATH_TO_JAR /tmp 2>> /dev/null >> /dev/null & | |
echo $! > $PID_PATH_NAME |
Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Dante Socks5 Setup, Debian | |
apt-get update | |
apt-get install make gcc | |
cd /usr/src | |
# get newest from http://www.inet.no/dante/download.html | |
wget http://www.inet.no/dante/files/dante-1.4.1.tar.gz |