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 number_format (number, decimals, dec_point, thousands_sep) { | |
// http://kevin.vanzonneveld.net | |
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) | |
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
// + bugfix by: Michael White (http://getsprink.com) | |
// + bugfix by: Benjamin Lupton | |
// + bugfix by: Allan Jensen (http://www.winternet.no) | |
// + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) | |
// + bugfix by: Howard Yeend | |
// + revised by: Luke Smith (http://lucassmith.name) |
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
jQuery.validator.addMethod("cpf", function(value, element) { | |
value = value.replace('.',''); | |
value = value.replace('.',''); | |
cpf = value.replace('-',''); | |
while(cpf.length < 11) cpf = "0" + cpf; | |
var expReg = /^0+$|^1+$|^2+$|^3+$|^4+$|^5+$|^6+$|^7+$|^8+$|^9+$/; | |
var a = []; | |
var b = new Number; | |
var c = 11; | |
for (i=0; i<11; i++){ |
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
jQuery.validator.addMethod("cnpj", function(cnpj, element) { | |
var numeros, digitos, soma, resultado, pos, tamanho, | |
digitos_iguais = true; | |
if (cnpj.length < 14 && cnpj.length > 15) | |
return false; | |
for (var i = 0; i < cnpj.length - 1; i++) | |
if (cnpj.charAt(i) != cnpj.charAt(i + 1)) { |
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
String.prototype.slugify = function(){ | |
return (this) | |
.replace(/[ÁÀÂÃÄ]/gi, 'a') | |
.replace(/[ÉÈÊË]/gi, 'e') | |
.replace(/[ÍÌÎÏ]/gi, 'i') | |
.replace(/[ÓÒÔÕÖ]/gi, 'o') | |
.replace(/[ÚÙÛÜ]/gi, 'u') | |
.replace(/[Ç]/gi, 'c') | |
.toLowerCase() // change everything to lowercase | |
.replace(/^\s+|\s+$/g, '') // trim leading and trailing spaces |
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
# Gzip compression | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
</ifmodule> | |
# Turn on URL rewriting | |
RewriteEngine On | |
# Installation directory | |
RewriteBase / |
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
NameVirtualHost *:80 | |
Include "conf/sites/*.conf" |
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
<VirtualHost *:80> | |
ServerName site.dev | |
DocumentRoot "D:\pasta_root" | |
</VirtualHost> | |
<Directory "D:\pasta_root"> | |
Options Indexes FollowSymLinks Includes ExecCGI | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
Require all granted |
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
{ | |
"folders": | |
[ | |
{ | |
"path": "www" | |
} | |
], | |
"build_systems": | |
[ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Clean URL" stopProcessing="true"> | |
<match url="^(.*)$" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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
############################################ | |
## Fonts Support - for Apache Server ## | |
############################################ | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> | |
# webfont mime types |
OlderNewer