- Mini state machines for page state with sass/jquery and
html
orbody
classes. - double-layer color constants: layer one: color names ($olive-green), layer two: common uses of colors ($link-color).
/* | |
* Containing floats in a consistent manner | |
* By Jonathan Neal and Nicolas Gallagher | |
*/ | |
/* | |
* New block formatting context method | |
* IE 6+, Firefox 2+, Safari 4+, Opera 9+, Chrome | |
*/ |
@import "local/provider/databar-icon/*.png"; | |
#databar { | |
.data-field { | |
.icon { | |
@include databar-icon-sprite(default); | |
@include databar-icon-sprite-dimensions(default); | |
float: left; | |
margin: 9px 3px 0 0; | |
} |
@mixin fancy-hover($sprite_dir, $off_state, $hover_state, $speed: 0.3s) | |
$sprites: sprite-map("#{$sprite_dir}/*.png") | |
$width: image-width(sprite_file($sprites, $off_state)) | |
$height: image-height(sprite_file($sprites, $off_state)) | |
@include hide-text | |
width: $width | |
height: $height | |
background: sprite($sprites, $off_state) no-repeat | |
display: block | |
position: relative |
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
// Original code from http://css-tricks.com/examples/FluidWidthYouTube/iframe.php | |
$(function() { | |
// find all videos | |
var allVideos = $("iframe[src^='http://www.youtube.com']"), | |
// The thing that is fluid width | |
body = $("body"), |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
Ok, I came up with an example.
Programming is like doing a massive sudoku. But you’re not just doing your own square; you have to line up the edges with squares that you’ve already done, or squares other people in your team are working on.
And it’s not just squares that you’ve done — you have to anticipate the sudokus you’ll be doing days, weeks or months from now, and leave easy numbers at the edges so it isn’t impossible to do those squares.
And that’s why some programmers are so engrossed in it, and get all worked up, because they’re like “You left a 5 in the middle of the square, what kind of asshole does that, now I’m gonna have to line all my squares up with that.”
And then someone points out a bug, and you have to trace it back to the square it came from, and then redo that square without screwing up all the other ones.
var MoogPlus = new Class({ | |
Extends: Fx.Morph, | |
options: { | |
rowSelector: '.row', | |
activeClass: 'active', | |
event: 'click', | |
'class': 'MoogPlus', |
require 'sass' | |
module Sass::Script::Functions | |
def svg_circle(radius, color, circle_type) | |
img = if circle_type.value == "disc" | |
%Q{<circle cx="#{radius.value}" cy="#{radius.value}" r="#{radius.value}" | |
stroke-width="0" fill="#{color}"/>} | |
else | |
%Q{<circle cx="#{radius.value}" cy="#{radius.value}" r="#{radius.value}" | |
stroke="#{color}" stroke-width="1" fill="white"/>} |