Skip to content

Instantly share code, notes, and snippets.

View vazgabriel's full-sized avatar

Gabriel de Carvalho Vaz vazgabriel

View GitHub Profile
@vazgabriel
vazgabriel / sign.sh
Created September 19, 2018 21:45
assign-android-application
########################################################
# Tips to sign the application
# @author Gabriel Vaz <[email protected]>
########################################################
# First moment comands (generating key) change "YOUR-KEY" and "YOUR-ALIAS" for your key and alias
# keytool -genkey -v -keystore YOUR-KEY.jks -keyalg RSA -keysize 2048 -validity 10000 -alias YOUR-ALIAS
# Run follow commands to sign the application
@vazgabriel
vazgabriel / validate-cpf.js
Created February 17, 2018 19:12
Function to validate brazilian CPF
/*
* Validates a CPF number
* @param String: cpfString // User CPF (just numbers or formated(000.000.000-00))
* @return Boolean: success/false // Returns if is valid
* Reference and logic: https://www.devmedia.com.br/validar-cpf-com-javascript/23916
* Official code: http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/funcoes.js
*/
function validateCpf(cpfString: string): boolean {
let validated = false; // Start with false