Skip to content

Instantly share code, notes, and snippets.

@sgobin
sgobin / formulario.html
Created April 12, 2014 17:56
Formulario Grid Sgobin
<form action="" class="formInsc">
<div class="linha lnForm">
<div class="nove colunas">
<label for="nome">Nome Completo</label>
<input type="text" name="nome" id="name">
</div>
<div class="tres colunas">
<label for="area">Área de Formação</label>
<select name="area" id="area">
<option value="1">Neurologia</option>
@sgobin
sgobin / renomear
Created July 17, 2014 20:07
Maurice Batch Rename
#!/bin/bash
for file in $1/*
do
if [ ! -d $file ]
then
nome=`echo $file | cut -d '.' -f2 | cut -d '/' -f2`
ext=`echo $file | cut -d '.' -f3`
if [ $ext == "asp" ]
then
echo $file
@sgobin
sgobin / gist:3145316
Created July 19, 2012 17:00
Botões: CSS3 Gradients (degradês) Usando SASS e Darken Firter
/* Variáveis Cores */
$GVCinza: #A7A9AC; /* descanso */
$GVOrange: #F4A330; /* ativo e down */
/* Classe */
a.botao {
color: #FFF;
display: inline-block;
padding: 0.5em 1em 0.4em;
cursor: pointer;
@sgobin
sgobin / select-uf
Last active October 7, 2015 12:28 — forked from mateusreis/gist:2022140
select de estados em formatos variados
<label for="uf">Estado</label>
<select name="uf" id="uf">
<option selected="selected" value="">&nbsp;</option>
<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>
@sgobin
sgobin / gist:3165578
Created July 23, 2012 19:15
Calcula Idade / Maioridade jQuery
function calculaMaioridade(nasc) {
var hoje = new Date(), idade;
idade = (
(hoje.getMonth() > nasc.getMonth())
||
(hoje.getMonth() == nasc.getMonth() && hoje.getDate() >= nasc.getDate())
) ? hoje.getFullYear() - nasc.getFullYear() : hoje.getFullYear() - nasc.getFullYear()-1;
if (idade > 18) { return true; }
@sgobin
sgobin / gist:3294733
Created August 8, 2012 12:21
Unicode Triângulos
&#x25B2; and &#x25BC; if you can't include Unicode characters directly. (Use UTF-8!)
U+25B2 (Black up-pointing triangle ▲)
U+25BC (Black down-pointing triangle ▼)
U+25C0 (Black left-pointing triangle ◀)
U+25B6 (Black right-pointing triangle ▶)
U+25B3 (White up-pointing triangle △)
U+25BD (White down-pointing triangle ▽)
U+25C1 (White left-pointing triangle ◁)
@sgobin
sgobin / helvetica-neue-light.scss
Last active December 11, 2015 11:48
#Helvetica Neue Light como família para fonte.- Baseado em: http://tumblr.gesteves.com/post/36097597/helvetica-neue-light;- adicionada fonte Segoe UI Light como fallback para Windows.
@mixin fontLight {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "wf_SegoeUILight", "wf_SegoeUI", "Segoe UI", "Roboto Light", sans-serif;
font-weight: 300;
}
@sgobin
sgobin / media-queries-retina.scss
Created January 23, 2013 17:45
Esquema de media queries incluindo Retina Displays (iPhone, iPad). O esquema funciona com "Mobile First", ou seja, é necessário iniciar com os estilos de smartphones e ir "subindo".
// Mobile First
// Médio - landscape smartphones e tablets pequenos
@media screen and (min-width: 28.75em) {
estilos...
}
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@sgobin
sgobin / conversorRWD.scss
Created February 14, 2013 14:14
Mixing converter medidas fixas em responsivas ou encontrar o valor baseado no contexto. Um mixing para % e outro para ems.
// Converte para em
@function re($target, $context){
@return ($target/$context)+0em;
}
// Converte para %
@function rp( $target, $context ) {
@return $target / $context * 100%;
}