This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function maskPixRandomKey(value: string): string { | |
/** | |
* Filtra caracteres de 0 a 9 e de a a f, conforme os manuais: | |
* https://www.bcb.gov.br/content/estabilidadefinanceira/pix/Regulamento_Pix/X_ManualOperacionaldoDICT.pdf - Página 14` | |
* https://www.bcb.gov.br/content/estabilidadefinanceira/pix/API-DICT-2.0.1.html#tag/Key | |
*/ | |
const cleanValue = value.replace(/[^0-9a-f]/g, '').substring(0, 32) | |
if (cleanValue.length < 9) { | |
return cleanValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is my daily use gitconfig, you should check if it fits your needs too | |
# Copy and paste into ~/.gitconfig | |
# Run `git alias` on terminal to show aliases and its command | |
# https://git-scm.com/docs/pretty-formats | |
[user] | |
name = X X | |
email = x@x.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pm() { | |
if [ -f package-lock.json ]; then | |
echo "Running with $(tput bold)npm" | |
command npm "$@" | |
elif [ -f yarn.lock ]; then | |
echo "Running with $(tput bold)yarn" | |
command yarn "$@" | |
elif [ -f pnpm-lock.yaml ]; then | |
echo "Running with $(tput bold)pnpm" | |
command pnpm "$@" |