Skip to content

Instantly share code, notes, and snippets.

@plcosta
Created July 24, 2019 18:56
Show Gist options
  • Save plcosta/0d6d2f1342dc41285d6b1457b9b3d1ff to your computer and use it in GitHub Desktop.
Save plcosta/0d6d2f1342dc41285d6b1457b9b3d1ff to your computer and use it in GitHub Desktop.
Brazilian CPF generator - Fish shell function
function cpf
set CPF (curl -X POST -w "\n" -d "acao=gerar_cpf" -d "pontuacao=S" -s https://www.4devs.com.br/ferramentas_online.php)
if type -q pbcopy
echo $CPF | pbcopy;
echo "$CPF copied to clipboard"
else if type -q xclip
echo $CPF | xclip -selection clipboard;
echo "$CPF copied to clipboard"
else
echo $CPF
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment