Skip to content

Instantly share code, notes, and snippets.

View refset's full-sized avatar
🌍

Jeremy Taylor refset

🌍
View GitHub Profile

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. 🔥

Get the tools

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

Keybase proof

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:

@refset
refset / org-freemind-to-org-mode.sh
Created April 13, 2016 15:51
Sed command to convert 4-space-indented Freeplane text (exported via copy/paste) to org-mode
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
@refset
refset / index.js
Created October 23, 2013 17:48
requirebin sketch
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)
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
}
@refset
refset / Manual Voxel.js Export
Last active December 14, 2015 10:39
Enter this in the console to save your voxel creations :D ...and then in the distant future some kind soul can work out how to import it so you can look at it again! (this was working with voxel.jit.su on ~2 March 2013)
myobj = []
crunch = {}
chunkCache = []
crunch.encode = function(chunk, cb) {
var runs = [];
var i = 0;