Skip to content

Instantly share code, notes, and snippets.

Guilherme Santiago gsantiago

Block or report user

Report or block gsantiago

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View trello-css-guide.md

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active Mar 9, 2020
Simple Authentication in Rail 4 Using Bcrypt
View authentication_with_bcrypt_in_rails_4.md

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@cassiocardoso
cassiocardoso / select-estados-br
Created Feb 12, 2014
Select com uma lista de todos os estados brasileiros.
View select-estados-br
<select name="estados-brasil">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
@rbarros
rbarros / cpf.js
Last active Nov 18, 2016
Validar CPF
View cpf.js
// Author: Ramon Barros <contato@ramon-barros.com>
/* jslint devel: true, unparam: true, indent: 4 */
/* global $,document,window,event,url,introJs,XMLHttpRequest,ActiveXObject,onlyNumbers */
function validarCPF(doc) {
'use strict';
var i, cpf = doc.replace(/\D/g, ''), pattern = /^(\d{1})\1{10}$/, sum, mod, digit;
if (cpf.length !== 11) {
return false;
}
@erikhenrique
erikhenrique / bin-cc.md
Last active Mar 23, 2020
Bin de cartões de crédito para validação
View bin-cc.md

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
@renancouto
renancouto / select.meses.html
Created Apr 26, 2013
Select simples com nomes dos meses do ano
View select.meses.html
<select>
<option>Escolha o mês</option>
<option value="01">Janeiro</option>
<option value="02">Fevereiro</option>
<option value="03">Março</option>
<option value="04">Abril</option>
<option value="05">Maio</option>
<option value="06">Junho</option>
<option value="07">Julho</option>
<option value="08">Agosto</option>
@danilowm
danilowm / gist:1058595
Created Jul 1, 2011
Lista de Estados Brasileiros
View gist:1058595
<select name="txt_estado" id="txt_estado">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="GO">Goiás</option>
<option value="ES">Espírito Santo</option>
You can’t perform that action at this time.