Skip to content

Instantly share code, notes, and snippets.

View imathis's full-sized avatar
🍽️
Hungry for biscuits.

Brandon Mathis imathis

🍽️
Hungry for biscuits.
View GitHub Profile
@import compass/utilities.sass
@import compass/css3.sass
=gradient(!type, !webkit_coords, !moz_coords, !color_start, !color_end, !color_stop = false)
!webkit_gradient= "#{!webkit_coords}, from(#{!color_start}), to(#{!color_end})"
!moz_gradient = "#{!moz_coords}, #{!color_start}, #{!color_end}"
@if !color_stop
!webkit_gradient= !webkit_gradient + ", " + !color_stop
background-image: -webkit-gradient(#{!type}, #{!webkit_gradient})
background: -moz-#{!type}-gradient(#{!moz_gradient})
document.observe('dom:loaded', function() {
$$('a[rel^=toggle]').each(toggleLinkBehavior)
});
function parseRel(key, rel){
var keypos = rel.indexOf(key)+key.length+1; //find occurance of key
var keys = rel.slice(keypos).split(']')[0].strip(); //split at end of key segment and trip whitespace
return keys.split(','); //return keys as an array
}
function toggleLinkBehavior(el){
el.toggle_ids = parseRel('toggle', el.readAttribute('rel'));
@imathis
imathis / gist:303650
Created February 13, 2010 19:58
linear-gradients.sass
// Sass:
+linear-gradient(colors(#ddd, #aaa)) //assumes "top"
+linear-gradient(colors(#ddd, #aaa), "left")
+linear-gradient(colors(#ddd, #aaa), "top left")
+linear-gradient(colors(#ddd, #aaa), "top right")
// Color stops - I'm using default vertical gradients for simplicity
+linear-gradient(colors(#ddd, #ccc, #aaa))
+linear-gradient(colors(#ddd, #ccc 20%, #aaa))
rebuild_site = lambda do |base, relative|
if relative && relative =~ /\.s[ac]ss/
puts ">>> Change Detected to #{relative} : updating stylsheets <<<"
system "compass"
else
if !relative
puts ">>> Compiling <<<"
else
puts ">>> Change Detected to #{relative} <<<"
end
=clearfix
overflow: hidden
+has-layout
/* clears while allowing overflow (great for use with box shadows)
=pie-clearfix
&:after
content: " "
display: block
height: 0
.pagination
a
float: left
display: inline-block
border: 1px solid $border
margin-left: 1px
padding: 1px 6px
line-height: 1.5em
span.disabled
@extend a
.app-message
border: 1px solid
border-top: 0
padding: 7px
margin: 0 -1px
p
+border-radius(4px)
padding: 10px $pad 10px $pad + 28
border: 1px solid
+box-shadow(rgba(255,255,255, .3), 0, 1px, 0)
/*
description: This simple plugin provides HTML 5 placeholder attribute to all browsers.
license: MIT-style
author: Brandon Mathis
ported from: MooTools NS.Placeholder plugin by Alexey Gromov
*/
As far as I know the game runs as follows:
1. For a game involving n people, Create n stacks with n notecards in each stack. (With 7 people you'd have 7 stacks with 7 notecards in each totaling 49 notecards)
2. Pass out the stacks so that each person has one stack of n cards.
3. Allow 2 minutes (or less) for each person to quietly write a word or short phrase on the top card. They should also write their name or initials. (examples: blue, stock market, brilliance)
4. When the time is up, they must pass their entire stack clockwise.
-- Now each person has a stack of cards from the person on their right. With a word on the top card. --
5. Everyone reads their card and then moves them to the back of the stack (still facing up). They have one minute to convey the meaning of the word or phrase in a drawing. Players can't use any words or numbers in their drawings, but other than that there are no restrictions. Players should also add their name or initials to their drawing.
6. At the end of one minute, each playe