Skip to content

Instantly share code, notes, and snippets.

View paulo-sorrentino's full-sized avatar
🙂
I may be slow to respond.

Paulo Sorrentino paulo-sorrentino

🙂
I may be slow to respond.
View GitHub Profile
@paulo-sorrentino
paulo-sorrentino / gist:7f6e0324fafffb5ec425cbcdb66a98af
Created July 10, 2019 17:44 — forked from willnss/gist:3246637
Gerador de CPF, NIT, CNPJ e CEI válidos
<html>
<head>
<title>Gerador de CPF, CNPJ e NIT Válidos</title>
<script language="javascript">
function gera_random(n) {
var ranNum = Math.round(Math.random()*n);
return ranNum;
}
function mod(dividendo,divisor) {
@paulo-sorrentino
paulo-sorrentino / .gitconfig
Created February 15, 2018 12:32 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@paulo-sorrentino
paulo-sorrentino / gist:d59e61163cc46a3d2847e225ba37d6f7
Created January 13, 2017 13:28 — forked from pranildasika/gist:2964211
Virtual fields using getter and setter methods in sequelize
var Sequelize = require('sequelize')
var sequelize = new Sequelize('sequelize_test', 'root')
//Note that the model definition does not have "fullName"
var User = sequelize.define('User', {
email: Sequelize.STRING,
firstName: Sequelize.STRING,
lastName: Sequelize.STRING,
},
{
<?php
class ImageManipulator
{
/**
* @var int
*/
protected $width;
/**
* @var int