Skip to content

Instantly share code, notes, and snippets.

@aboritskiy
aboritskiy / remove-gpg-user.sh
Last active July 13, 2020 12:49 — forked from glogiotatidis/remove-gpg-user.sh
Git-crypt remove user.
#!/bin/bash
#
# Script to remove GPG key from git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
@aboritskiy
aboritskiy / kill-all.sh
Created December 11, 2020 12:23
Delete everything in elasticsearch host
curl -X DELETE 'http://localhost:9200/_all'
@aboritskiy
aboritskiy / clean-up-merged-remote-branches.sh
Created February 20, 2023 14:12
Remove merged remote branches
#!/bin/bash
set -eu
git fetch -ap
git branch -r --merged origin/master | grep -v master | grep -v dev | grep -v HEAD | sed 's/^ origin\///' | xargs git push --delete origin