Skip to content

Instantly share code, notes, and snippets.

View ansssu's full-sized avatar

Anderson Ribeiro ansssu

View GitHub Profile
@ansssu
ansssu / kafka-useful-commands.md
Created November 23, 2022 22:11 — forked from mjuric/kafka-useful-commands.md
Useful Kafka wrangling commands

Utilities you'll care about

All these are already installed on epyc.

  • kafkacat (conda install -c conda-forge kafkacat)

  • kt (grab it from https://github.com/fgeller/kt/releases)

  • kafka-* (come with kafka, if you yum install if from Confluent's repo, or via Docker if you're so inclined). Warning -- JVM based and dreadfully slow.

  • jq (conda install -c conda-forge jq or use your favorite package manager)

@ansssu
ansssu / number-pad-zero.js
Created November 11, 2019 11:01 — forked from endel/number-pad-zero.js
Simplest way for leading zero padding in JavaScript
Number.prototype.pad = function(size) {
var s = String(this);
while (s.length < (size || 2)) {s = "0" + s;}
return s;
}
(1).pad(3) // => "001"
(10).pad(3) // => "010"
(100).pad(3) // => "100"