Skip to content

Useful code snippets and scripts

Enable paste on websites that block it
Don't F&_k with Paste
// Prevents websites from blocking copy/paste
var allowPaste = function(e){
  return true;
document.addEventListener('paste', allowPaste, true);
Get IPV4
Get the current IPv4 address
curl -s
Get IPV6
Get the current IPv6 address
curl -s
List versions of PyPI package
List the available versions of a PyPi package
curl -s<package>/json | jq '.releases | keys | .[]'
Git: Sign commits
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
Delete local git branches except a few
 git branch | grep -v "main" | grep -v "master" | xargs git branch -D


Restart windows into BIOS

shutdown /r /fw /t 0

Restart windows into Safe Mode

shutdown /r /o /t 0

Restart windows into Normal Mode

shutdown /r /t 0

Shutdown windows

shutdown /s /t 0

Get WIFI Passwords on windows

(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table Wrap