Skip to content

Instantly share code, notes, and snippets.

@hectorj
hectorj / git-rebase-du-pauvre.sh
Created August 27, 2018 14:47
`git rebase` du pauvre
#!/usr/bin/env bash
set -eu
git fetch origin
git merge origin/master
git reset origin/master
git add --all
git commit -m "Commit tout beau tout propre"
git push --force-with-lease

Keybase proof

I hereby claim:

  • I am HectorJ on github.
  • I am hectorj (https://keybase.io/hectorj) on keybase.
  • I have a public key whose fingerprint is C5C0 5A05 A478 68E2 C55B 7D0D 2092 0300 61A5 BBCA

To claim this, I am signing this object:

@hectorj
hectorj / cache_key_hash_test.go
Last active August 29, 2015 14:23
Bench of several hash algorithms for cache keys in golang
package cachekeyhash_test
import (
"crypto/sha256"
"fmt"
"hash/fnv"
"io"
"testing"
"crypto/md5"
"crypto/sha1"
@hectorj
hectorj / esi.ebnf
Created May 17, 2015 04:15
Attempt at defining the ESI expressions' grammar
Expression = Value {{" "} Operator {" "} Value}.
Operator = Comparison_operator | Logical_operator .
Comparison_operator = "==" | "!=" | "<" | ">" | "<=" | ">=".
Logical_operator = "!" | "&" | "|".
Variable = "$(" (Simple_variable | Substructure) ")".
Simple_variable = "HTTP_HOST" | "HTTP_REFERER".
Substructure = ("HTTP_ACCEPT_LANGUAGE" | "HTTP_COOKIE" | "HTTP_USER_AGENT" | "QUERY_STRING") "{" word "}".
word = .