Skip to content

Instantly share code, notes, and snippets.

View leods92's full-sized avatar

Leonardo Schlossmacher leods92

View GitHub Profile
@leods92
leods92 / dabblet.css
Created January 9, 2012 12:44
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, blue);
min-height:50%;
.logo {
background: url('http://envylabs.com/images/envylabs_logo.png');
width: 197px;
height: 111px;
display: inline-block;
position: relative;
cursor: pointer;
}
.logo:hover::before {
@leods92
leods92 / dabblet.css
Created June 2, 2012 14:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@leods92
leods92 / gist:2949276
Created June 18, 2012 16:33
Javascript Car class
var Car
, prius
;
Car = function(b, m, y) {
this.brand = b;
this.model = m;
this.year = y;
};
@leods92
leods92 / git_to_dropbox.sh
Created June 30, 2012 19:04
Shell script to pack git repository in a tarball and place it in Dropbox folder
#!/bin/sh
GIT_REPO="/path/to/git/repo"
cd $GIT_REPO
git archive --format=tar --prefix=package/ master | gzip > ~/Dropbox/repo.tar.gz && open ~/Dropbox
echo "Now generate the Dropbox link and add it to package.json."
{
"name": "awesome-project",
"version": "0.1.0",
"dependencies": {
"mysecretproject": "https://dl.dropbox.com/s/randomcharshere/mysecretproject.tar.gz?dl=1"
}
}
@leods92
leods92 / dabblet.css
Created August 13, 2012 19:37
Untitled
a::before {
content: "this is a link => ";
margin: 0 4px 0 2px;
}
@leods92
leods92 / dabblet.css
Created August 13, 2012 19:46
Untitled
a[target]::before {
content: "this is a link => ";
margin: 0 4px 0 2px;
}
@leods92
leods92 / dabblet.css
Created August 13, 2012 20:07
Untitled
a[target] {
display: inline;
}
a[target]::before {
content: "this is a link => ";
margin: 0 4px 0 2px;
}
@leods92
leods92 / gist:6405525
Last active December 22, 2015 02:48
Validação de números celulares no Brasil (válido em 1º de setembro de 2013).
# first 2 digits represent dialing code
# dialing codes in Brazil don't start with 0
#
# the following represent the phone
# must have 8 digits
# might have 9 if dialing code is 11, 12, 13, 14, 15, 16, 17, 18 or 19
# http://g1.globo.com/sao-paulo/noticia/2013/08/nono-digito-comeca-valer-para-telefones-celulares-do-interior-paulista.html
# first digit must start with 7, 8 or 9
# might start with 5 as well if dialing code is 11
#