This file contains hidden or 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
# git | |
alias g="git" | |
alias gs="git status" | |
#alias gacp="git add. && git commit -m '.' && git push origin $(git branch | grep \* | cut -d ' ' -f2)" | |
#alias gp="git push origin $(git branch | grep \* | cut -d ' ' -f2)" | |
alias ga="git add ." | |
alias gac="git add . && git commit -m" | |
alias gc="git commit -m" | |
alias gca="git commit --amend" | |
alias gcam="git commit --amend --no-edit" |
This file contains hidden or 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 toFormData(obj, form, namespace) { | |
let fd = form || new FormData(); | |
let formKey; | |
for(let property in obj) { | |
if(obj.hasOwnProperty(property) && obj[property]) { | |
if (namespace) { | |
formKey = namespace + '[' + property + ']'; | |
} else { | |
formKey = property; |
This file contains hidden or 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
@echo off | |
if "%PHPBIN%" == "" set PHPBIN=C:\path\to\PHP\executable\dir\.\php.exe | |
"%PHPBIN%" "C:\path\to\composer.phar" %* |
This file contains hidden or 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
\\\\\\\\\\\\\\\ | |
\\\\\\\\\\\\\\\ | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |
#########++++++###+++ | |
#########++++++###+++ | |
###+++###+++++++++###++++++ | |
###+++###+++++++++###++++++ | |
###+++######+++++++++###+++++++++ | |
###+++######+++++++++###+++++++++ |
This file contains hidden or 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 formatNumber(number) | |
{ | |
number = parseFloat(number); | |
var number = number.toFixed(2) + ''; | |
var x = number.split('.'); | |
var decimal = x[0]; | |
var value = x.length > 1 ? ',' + x[1] : ''; | |
var pattern = /(\d+)(\d{3})/; | |
This file contains hidden or 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
RewriteCond %{HTTP_HOST} ^dominio.com [NC] | |
RewriteRule (.*) http://www.dominio.com/$1 [L,R=301] |
This file contains hidden or 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 validarPIS(pis) { | |
var multiplicadorBase = "3298765432"; | |
var total = 0; | |
var resto = 0; | |
var multiplicando = 0; | |
var multiplicador = 0; | |
var digito = 99; | |
// Retira a mascara | |
var numeroPIS = pis.replace(/[^\d]+/g, ''); |