Skip to content

Instantly share code, notes, and snippets.

View elvis-cai's full-sized avatar
🌴
On vacation

elvis-cai

🌴
On vacation
View GitHub Profile
@elvis-cai
elvis-cai / pdb-validation-policy.yaml
Created October 23, 2024 22:20 — forked from iyalang/pdb-validation-policy.yaml
Kyverno policy for validating Pod Disruption Budgets (PDBs)
---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: pdb-validation
annotations:
policies.kyverno.io/title: Check PodDisruptionBudget minAvailable and maxUnavailable
policies.kyverno.io/category: Other
policies.kyverno.io/subject: PodDisruptionBudget, Deployment, StatefulSet
policies.kyverno.io/description: >-
@ursuad
ursuad / kafka-cheat-sheet.md
Last active March 12, 2025 10:08
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@pauloconnor
pauloconnor / gist:4707710
Last active March 31, 2025 00:21
Logstash Mutate Filter for stripping Linux color codes from log files
# Get rid of color codes
mutate {
gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""]
}