Skip to content

Instantly share code, notes, and snippets.

View marciobarrios's full-sized avatar

Marcio Barrios marciobarrios

View GitHub Profile
@marciobarrios
marciobarrios / structure.js
Created November 24, 2009 12:07
organizacion basica de aplicacion js
var APP = function() {
var private_var;
function private_method() {
// do stuff here
}
return {
method_1 : function() {
// do stuff here
},
method_2 : function() {
var myapp = {};
myapp.FirstClass = function() { ... };
myapp.FirstClass.prototype.method = function() { ... };
myapp.SecondClass = function() { ... };
var DED = function() {
var private_var;
function private_method() {
// do stuff here
}
return {
method_1 : function() {
// do stuff here
},
method_2 : function() {
@marciobarrios
marciobarrios / random_numbers.js
Created December 23, 2009 16:12
Numeros aleatorios
// Returns a random number between min and max
function getRandom(min, max)
{
return Math.random() * (max - min) + min;
}
// Returns a random integer between min and max
// Using Math.round() will give you a non-uniform distribution!
function getRandomInt(min, max)
{
<style type="text/css">
p span.displaynone { display:none; }
</style>
<p>silvanfoobar8@<span class=”displaynone”>null</span>tilllate.com</p>
@marciobarrios
marciobarrios / dabblet.css
Created January 2, 2012 18:01 — forked from philippbosch/dabblet.css
iOS Native App Default Style implemented in CSS
/* iOS Native App Default Style implemented in CSS */
/* Bootstrapping … */
* {
margin: 0;
padding: 0;
font-size: inherit;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
@marciobarrios
marciobarrios / dabblet.css
Created January 4, 2012 09:27 — forked from anonymous/dabblet.css
iOS Native App Default Style implemented in CSS
/* iOS Native App Default Style implemented in CSS */
/* Bootstrapping … */
* {
margin: 0;
padding: 0;
font-size: inherit;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
@marciobarrios
marciobarrios / dabblet.css
Created January 4, 2012 16:45 — forked from LeaVerou/dabblet.css
Lined paper that follows the text
/**
* Lined paper that follows the text
* Support: Chrome, FF 3.6+, Saf 5.1+, Opera 11.50+, IE10
*/
/* Just decorative */
padding: 20px;
/* The font. Try changing font-size and see how the lines
@marciobarrios
marciobarrios / dabblet.css
Created January 10, 2012 10:51 — forked from daneden/dabblet.css
Search Suggestions
/*
Search Suggestions
Original design by Visual Idiot - http://dribbble.com/shots/377281-Search-Suggestions
*/
html {
min-height: 100%;
background: -webkit-linear-gradient(#dbddde, #b6babb);
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
@marciobarrios
marciobarrios / dabblet.css
Created January 29, 2012 16:47 — forked from daneden/dabblet.css
Animation example with :target
/**
* Path icon hover
*
* Example of the desired effect (hover over the user avatar) https://path.com/p/5Eplz
*
* Close, but annoying that the animation runs on page load.
* Possible solution could be to fade entire page content in while initial
* animation runs.
*/