Skip to content

Instantly share code, notes, and snippets.

@j18e
j18e / remove-from-git-history.sh
Created November 14, 2019 14:55
Remove file(s) from git history
#!/bin/bash -eu
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch src/images/my_large_photos_*.jpg' \
--prune-empty --tag-name-filter cat -- --all
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
git reflog expire --expire=now --all
@j18e
j18e / traefik-dynamic.yml
Created April 6, 2020 11:02
Traefik Forward Auth
http:
routers:
# http_catchall redirects all incoming traffic from http to https
http_catchall:
entrypoints:
- "http"
middlewares:
- "https_redirect"
rule: "HostRegexp(`{any:.+}`)"
service: "noop"

Keybase proof

I hereby claim:

  • I am j18e on github.
  • I am j18e (https://keybase.io/j18e) on keybase.
  • I have a public key ASBTWHuLkz_4no8CmGB_kFkwI3duTnfDtl9GK2ui74ImLgo

To claim this, I am signing this object: