Skip to content

Useful code snippets and scripts

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