Skip to content

Instantly share code, notes, and snippets.

@khepin
khepin / EasterEgg.js
Last active December 13, 2015 21:18
EasterEgg.js
function EasterEgg(egg, cb) {
this.egg = egg;
this.cb = cb;
this.start();
}
EasterEgg.prototype.start = function() {
var egg = this.egg;
var buffer = [];
var cb = this.cb;
@darren131
darren131 / gist:3410875
Created August 21, 2012 02:30
resize sprites in Compass
@mixin resize-sprite($map, $sprite, $percent) {
$spritePath: sprite-path($map);
$spriteWidth: image-width($spritePath);
$spriteHeight: image-height($spritePath);
$width: image-width(sprite-file($map, $sprite));
$height: image-height(sprite-file($map, $sprite));
@include background-size(ceil($spriteWidth * ($percent/100)) ceil($spriteHeight * ($percent/100)));
width: ceil($width*($percent/100));
height: ceil($height*($percent/100));