[
"AC"=>"Acre",
"AL"=>"Alagoas",
"AM"=>"Amazonas",
"AP"=>"Amapá",
"BA"=>"Bahia",
"CE"=>"Ceará",
"DF"=>"Distrito Federal",
| server { | |
| listen 80; | |
| server_name CHANGEME.app; | |
| root /var/www/vhosts/CHANGEME.app/public; | |
| index index.html index.htm index.php; | |
| charset utf-8; | |
| location / { |
How to customize ubuntu with Arc-Theme + Numix icons
sudo apt-get install unity-tweak-tool
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/arc-theme.list"
| ``` | |
| wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains example.com --no-parent http://example.com | |
| ``` |
| // Use a classe ".phoneNumber" no campo input do telefone | |
| $('.phoneNumber').on('keyup', function (e) { | |
| if(e.keyCode == 8){ | |
| let numberField = $(this); | |
| let num = numberField.val(); | |
| if(num.length == 15){ | |
| let n = num.replace(/ /g, ''); | |
| n = n.split(''); |
| // To use it, jus add the "numberInput" class on your input field | |
| $('.numberInput').on('keypress', function (e) { | |
| // Accept only numbers | |
| var charCode = (e.which) ? e.which : e.keyCode; | |
| if (charCode != 46 && charCode > 31 | |
| && (charCode < 48 || charCode > 57)) | |
| return false; | |
| }).on('keyup', function () { | |
| $(this).val($(this).val().replace(/\D/g, '')); |
| // To use it, jus add the "money" class on your input field | |
| $('.money').on('keypress', function (e) { | |
| // Accept only numbers | |
| var charCode = (e.which) ? e.which : e.keyCode; | |
| if (charCode != 46 && charCode > 31 | |
| && (charCode < 48 || charCode > 57)) | |
| return false; | |
| }).on('keyup', function (e) { |
| function slugify (text) { | |
| const a = 'àáãäâèéëêìíïîòóöõôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'; | |
| const b = 'aaaaaeeeeiiiiooooouuuuncsyoarsnpwgnmuxzh------'; | |
| const p = new RegExp(a.split('').join('|'), 'g'); | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(p, c => | |
| b.charAt(a.indexOf(c))) // Replace special chars | |
| .replace(/&/g, '-and-') // Replace & with 'and' |
| // Same as slugify.js but using underscore | |
| // Ex: "Anões de Jardim Botânico" will become "anoes_de_jardim_botanico" | |
| function underscoredSlug (text) { | |
| const a = 'àáãäâèéëêìíïîòóöõôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/-,:;'; | |
| const b = 'aaaaaeeeeiiiiooooouuuuncsyoarsnpwgnmuxzh______'; | |
| const p = new RegExp(a.split('').join('|'), 'g'); | |
| return text.toString().toLowerCase() |
| (function($){ | |
| $.fn.serializeObject = function(){ | |
| var self = this, | |
| json = {}, | |
| push_counters = {}, | |
| patterns = { | |
| "validate": /^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/, | |
| "key": /[a-zA-Z0-9_]+|(?=\[\])/g, | |
| "push": /^$/, |