Skip to content

Instantly share code, notes, and snippets.

@sgobin
sgobin / .gitignore
Last active September 21, 2017 17:32
Principais arquivos a serem ignorados pelo git
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@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 / 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 / sprite-retina.scss
Created December 20, 2013 18:00
Usando sprite para dispositivos retina.
// Sprite normal tem 100px x 200px -
// O Sprite retina é exatamente o dobro do normal: 200px x 400px
.sprite {
background-image: url(sprite.png);
background-repeat: no-repeat;
text-indent: -9999em;
display: block;
float: left;
}
@sgobin
sgobin / menu.html
Created December 19, 2013 16:27
Menu Dropdown Ativo por Clique
<ul class="menu">
<li><a href="javascript:;">Home</a></li>
<li class="tem-submenu"><a href="javascript:;">Viagens para o Peru</a>
<div class="submenu">
<ul>
<li><a href="#">Peru</a></li>
<li><a href="#">Peru &amp; Argentina</a></li>
<li><a href="#">Peru &amp; Amazônia</a></li>
</ul>
<ul>
@sgobin
sgobin / _gridSgobin.scss
Last active December 18, 2015 23:29
Um mínimo grid para importar por SCSS. Pode ser fixo ou responsivo.
/* RESETS */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
/**********
Variaveis
**********/
$gridPad: 10px;
/*******************
@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%;
}
// 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 / 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...
}
@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;
}