Skip to content

Instantly share code, notes, and snippets.

View n4j's full-sized avatar
⚡ ⚡ ⚡

Neeraj Shah n4j

⚡ ⚡ ⚡
View GitHub Profile
@jonathanwcrane
jonathanwcrane / Purge_CloudWatchAlarms.py
Last active July 21, 2025 04:42
Purge CloudWatch alarms for instances that no longer exist
#Step 1: Get a list of all alarms in INSUFFICIENT_DATA status
#Step 2: Get a list of all instances (stopped and started)
#Step 3: Find all alarms on instances that don't exist, and delete them
###################################################
#Step 1: Get alarms in INSUFFICENT_DATA state
###################################################
#The max that we can get per loop is 100; all alarms for nonexistent instances will be in
#INSUFFICIENT_DATA state so let's just go through those.
insuff_alarms = []
loops = 1
@jkreps
jkreps / benchmark-commands.txt
Last active July 28, 2025 07:14
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 1, 2025 17:09
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@alonsorobles
alonsorobles / http-cluster.js
Created December 30, 2012 18:40
Killing zombie workers!
var cluster = require('cluster');
var http = require('http');
var numCPUs = require('os').cpus().length;
var rssWarn = (50 * 1024 * 1024),
heapWarn = (50 * 1024 * 1024);
var workers = {};
if (cluster.isMaster) {