I've been working with Apache 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 hidden or 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
merry: 11 0 11 0 11 11 0 0 11 0 11 0 11 11 0 0 | |
merry2: 1 0 1 0 3 3 0 0 1 1 0 0 6 6 0 0 5 5 5 5 | |
zebmas: 18 0 18 0 18 13 0 0 13 0 20 0 18 18 0 0 | |
zebmas2: 0 1 1 1 0 | |
song: +(merry; zebmas) | |
/ note transcription | |
/ C-3 C#3 D-3 D#3 E-3 F-3 F#3 G-3 G#3 A-3 A#3 B-3 | |
/ 1 2 3 4 5 6 7 8 9 10 11 12 | |
/ C-4 C#4 D-4 D#4 E-4 F-4 F#4 G-4 G#4 A-4 A#4 B-4 |
I hereby claim:
- I am refset on github.
- I am refset (https://keybase.io/refset) on keybase.
- I have a public key ASAsN3gKAallnGDavX_bcgmSPlT8pkkOTwBA93-iGr1x8Ao
To claim this, I am signing this object:
This file contains hidden or 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
sed 'h;s/[^ ].*//;s/ /*/g;s/$/ /;G;s/\n *//' file.txt > out.org | |
# the first line might need removing or manually editing to be 100% correy | |
# couldn't have done it without: http://unix.stackexchange.com/a/47210 |
This file contains hidden or 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
var proquint = require('proquint')// require something | |
var Buffer = require('buffer-browserify').Buffer | |
var s = "brfxxccxxmnpcccclllmmnprxvclmnckssqlbb11116" | |
var id = proquint.encode(Buffer(s+(s.length%2?" ":""),"utf-8")); | |
alert(s + "\n\n...is more pronouncible, in proquint form, as:\n\n" +id) |
This file contains hidden or 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
function binRelX(elA, elB){ | |
return elA > elB ? true : false | |
} | |
function binRelXObj(elA, elB, opts){ | |
//opts, accessor, | |
var value = opts.value || "value" | |
return elA[value] > elB[value] ? true : false | |
} |
This file contains hidden or 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
myobj = [] | |
crunch = {} | |
chunkCache = [] | |
crunch.encode = function(chunk, cb) { | |
var runs = []; | |
var i = 0; |
NewerOlder