Skip to content

Useful code snippets and scripts

Don't F&_k with Paste
// Prevents websites from blocking copy/paste
var allowPaste = function(e){
  return true;
document.addEventListener('paste', allowPaste, true);
Get the current IPv4 address
curl -s
Get the current IPv6 address
curl -s
List the available versions of a PyPi package
curl -s<package>/json | jq '.releases | keys | .[]'


Sign all commits from the commit id
git rebase --exec 'git commit --amend --no-edit -n -S' -i <commit id>
Resign all commits in a repository
git rebase --exec 'git commit --amend --no-edit --no-verify -S' -i --root
Keep the commited date when signing using above commands
git rebase --committer-date-is-author-date -i --root