Skip to content

Instantly share code, notes, and snippets.

@lauri
lauri / gist:84674ab22aafc4e0f398a52a53cfd7ec
Last active April 30, 2018 18:37
Remap section sign key (§) to ESC (useful if you have a MacBook Pro with touch bar)
# 0x700000064 is the useless section sign key below ESC on Finnish keyboards
# 0x700000029 is ESC
hidutil property --set '{"UserKeyMapping": [{
"HIDKeyboardModifierMappingSrc":0x700000064,
"HIDKeyboardModifierMappingDst":0x700000029
}]}'
@yaroncon
yaroncon / KafkaProducer.java
Last active November 19, 2020 06:12
Kafka producer, with Kafka-Client and Avro
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.EncoderFactory;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@jbrook
jbrook / updateWhisper.sh
Created August 3, 2012 10:45
Bash script to set the xFilesFactor and retention for whisper files - Graphite aggregation
#!/usr/bin/env bash
for file in `find . -name "*.wsp" -type f`; do
if [[ $file != *count.wsp && $file != *.tmp ]]
then
/usr/local/bin/whisper-resize.py --xFilesFactor=0.0 --nobackup $file 10:2160 60:10080 600:262800
fi
done