Skip to content

Instantly share code, notes, and snippets.

View eduardo-mior's full-sized avatar
🎯
Concentrando

Eduardo Mior eduardo-mior

🎯
Concentrando
View GitHub Profile
@fernandosavio
fernandosavio / pt-br.js
Created September 1, 2014 13:09
Locale pt-br of Moment.js
// moment.js locale configuration
// locale : brazilian portuguese (pt-br)
// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active July 10, 2024 12:10
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@rdakar
rdakar / Validação de CPF e CNPJ - Java
Created September 18, 2017 20:42
Validação de CPF e CNPJ - Java
public class CpfCnpjUtils {
private static final int[] pesoCPF = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2};
private static final int[] pesoCNPJ = {6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2};
public static boolean isValid(String cpfCnpj) {
return (isValidCPF(cpfCnpj) || isValidCNPJ(cpfCnpj));
}
private static int calcularDigito(String str, int[] peso) {
int soma = 0;
@eduardo-mior
eduardo-mior / Lista de Órgãos Emissores
Last active July 18, 2024 14:08
Lista completa de órgãos emissores de documentos de identificação.
ABNC - Academia Brasileira de Neurocirurgia
AGU - Advocacia-Geral da União
ANAC - Agência Nacional de Aviação Civil
CAER - Clube de Aeronáutica
CAU - Conselho de Arquitetura e Urbanismo
CBM - Corpo de Bombeiro Militar
CFA - Conselho Federal Administração
CFB - Conselho Federal de Biblioteconomia
CFBIO - Conselho Federal de Biologia
CFBM - Conselho Federal de Biomedicina
@eduardo-mior
eduardo-mior / disable-form-auto-complete.md
Last active June 10, 2024 02:47
How to disable HTML Input Autocomplete

Definitive guide → 6 ways to solve

I would very much like there to be a WEB standard for this, but unfortunately there is not!

I studied this for several days and gathered a lot of information and I will share it with you.

Before developing or using an internet hack you need to know that there are 2 types of Autocomplete. There is the autocomplete of the page and the autocomplete of the browser.

This is the global browser autocomplete. It appears whenever you define autocomplete="off" or when you define no autocomplete but define type="email" for example. The global autocomplete suggests emails you've used on other sites. The global autocomplete has a manage button at the bottom and can be disabled in the browser config. image