Skip to content

Instantly share code, notes, and snippets.

@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
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.

@dspezia
dspezia / db.c
Created August 4, 2012 15:01
Redis hack to get notified when a key expire
// Change propagateExpire function in db.c as follows:
void propagateExpire(redisDb *db, robj *key) {
/* HORRIBLE HACK STARTS HERE */
/* robj *argv[2]; */
robj *argv[3];
/* HORRIBLE HACK ENDS HERE */
argv[0] = shared.del;