Skip to content

Instantly share code, notes, and snippets.

View vakhov's full-sized avatar
💭
learn new

Alex Vakhov vakhov

💭
learn new
View GitHub Profile
@vakhov
vakhov / gist:cd9180035792fe405456d8a13df0981a
Created June 6, 2019 10:20 — forked from sweenzor/gist:2933958
Kill all celery tasks (redis)
# nuke the queue
redis-cli FLUSHALL
# nuke anything currently running
pkill -9 celeryd
@chrismccoy
chrismccoy / gitcheats.txt
Last active October 19, 2025 17:38
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# delete all repos with 1 per line in a text file in powershell
Get-Content .\repos-to-delete.txt | ForEach-Object { gh repo delete $_ --yes }
# delete all private repos (this can not be undone)
gh repo list --limit 1000 --json isPrivate,nameWithOwner | jq -r '.[] | select(.isPrivate == true) | .nameWithOwner' | xargs -n 1 gh repo delete --yes