NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
@import "compass/utilities/sprites/base"; | |
// General Sprite Defaults | |
// You can override them before you import this file. | |
$icon-sprite-base-class: ".icon-sprite" !default; | |
$icon-sprite-dimensions: false !default; | |
$icon-position: 0% !default; | |
$icon-spacing: 0 !default; | |
$icon-repeat: no-repeat !default; |
@import "compass/utilities/sprites/base"; | |
// General Sprite Defaults | |
// You can override them before you import this file. | |
$emblem-sprite-base-class: ".emblem-sprite" !default; | |
$emblem-sprite-dimensions: false !default; | |
$emblem-position: 0% !default; | |
$emblem-spacing: 0 !default; | |
$emblem-repeat: no-repeat !default; |
/** | |
* Provides requestAnimationFrame in a cross browser way. | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
if ( !window.requestAnimationFrame ) { | |
window.requestAnimationFrame = ( function() { | |
return window.webkitRequestAnimationFrame || |
/*! | |
* jQuery Detach+ - v0.1pre - 5/18/2011 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
(function($){ |
var sprintf = function (text) { | |
var i = 1, args = arguments; | |
return text.replace(/%(0)?(\d*)?\.?(\d*)?(s|f)/g, function (pattern) { | |
var a = arguments, | |
precision = +a[3], | |
value = args[i++], | |
padSize = +a[2] - (~~value).toString().length, | |
padding = padSize > 0 ? (new Array(padSize + 1).join(a[1] || ' ')) : ''; | |
return padding + (a[4] === 'f' && a[3] ? value.toFixed(+precision) : value); | |
}); |
<!-- | |
Ant target for autogenerating a changelog based on Git tags | |
Workflow: | |
1. Do all of your checkins for a given version. | |
2. When you're ready to officially create a new version, tag it using git tag, such as "git tag v0.3.0". | |
3. If you don't already have a file named CHANGELOG in the root directory, make one. | |
4. Run "ant changelog.update" |
/* | |
A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
from @addyosmani, @cowboy, @ajpiano and others. | |
Disclaimer: | |
----------------------- | |
Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
is still very much a work-in-progress. I am not advocating the use of anything here | |
until we've had sufficient time to tweak and weed out what the most useful patterns |
define({ | |
/* | |
* Simplified prototypal inheritance, see http://javascript.crockford.com/prototypal.html | |
*/ | |
create: function (obj){ | |
function F() {} | |
F.prototype = obj; | |
return new F(); | |
}, |
/** | |
* First, better, "set exports/return" option | |
*/ | |
(function (define) { | |
//The 'id' is optional, but recommended if this is | |
//a popular web library that is used mostly in | |
//non-AMD/Node environments. However, if want | |
//to make an anonymous module, remove the 'id' | |
//below, and remove the id use in the define shim. | |
define('id', function (require) { |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name