Skip to content

Instantly share code, notes, and snippets.

View robsonsanches's full-sized avatar

Robson Sanches robsonsanches

  • São Paulo - Brasil
View GitHub Profile
@robsonsanches
robsonsanches / transitions.css
Last active December 30, 2021 15:37
Force Bootstrap v4 transitions (ignores prefers-reduced-motion media feature)
/*
* Force Bootstrap v4 transitions
* (ignores prefers-reduced-motion media feature)
* https://gist.github.com/robsonsanches/33c6c1bf4dd5cf3c259009775883d1c0
*/
.fade {
transition:opacity 0.15s linear !important;
}
.collapsing {
@cassiocardoso
cassiocardoso / select-estados-br
Created February 12, 2014 23:31
Select com uma lista de todos os estados brasileiros.
<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>
@codeguy
codeguy / slugify.js
Created September 24, 2013 13:19
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}