Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
pedrodelgallego / dabblet.css
Created April 27, 2013 13:24
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 21, 2013 11:29 — forked from LeaVerou/dabblet.css
iOS 6 style switch checkboxes
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 21, 2013 11:28 — forked from LeaVerou/dabblet.css
Hexagon kitty - By @LeaVerou
/* Hexagon kitty - By @LeaVerou
Disappointingly inflexible, but still interesting methinks.
*/
.hexagon {
display: inline-block;
position: relative;
width: 200px;
height: 200px;
transform: scale(1.25,.707) rotate(-45deg);
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 13, 2013 05:50 — forked from LeaVerou/dabblet.css
CSS Box model demo
/**
* CSS Box model demo
*/
#box {
width: 300px;
height: 200px;
padding: 30px;
border-width: 10px;
/*box-sizing: border-box;*/
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 13, 2013 05:09 — forked from LeaVerou/dabblet.css
Switch-style checkboxes.
/**
* Switch-style checkboxes.
* Inspired by Espresso’s “Tools” switch
*/
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked { /* :checked here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
require "rubygems"
require "dm-core"
class Word
include DataMapper::Resource
property :id, Serial
property :text, String
has n, :translations #, :model => 'Word', :foreign_key => [:word_id]
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
module Rack
class AllYourBase
def initialize(app, options = {})
@app = app
@options = options
end
def call(env)
@request = Rack::Request.new(env)