This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Prompt IE6 users to install Chrome Frame --> | |
<!--[if lt IE 7 ]> | |
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script> | |
<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script> | |
<![endif]--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Preferably in an IE style sheet */ | |
/* Forces IE7 to display as inline-block */ | |
.problemElement, | |
.problemElement2, | |
.problemElement3 { | |
zoom: 1; | |
*display: inline; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/utilities/sprites"; // Include compass sprite helpers | |
@import "compass/css3/background-size"; // Include helper to calc background size | |
@mixin sprite($name, $hover: false, $active: false) { | |
@include retina-sprite($name, $sprites, $sprites2x, $hover, $active); | |
} | |
// The general purpose retina sprite mixin. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# returns the Gravatar for the given user. | |
def gravatar_for(user) | |
gravatar_id = Digest::MD5::hexdigest(user.email.downcase) | |
gravatar_url = "http://gravatar.com/avatar/#{gravatar_id}" | |
image_tag(gravatar_url, alt: user.name, class:"gravatar") | |
end | |
# This is a small rails helper that returns a users gravatar image | |
# image alt text defaults to user.name, but can easily be changed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.console) window.console = { log: function() { } }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// allows you to replace a strings char at a specific index | |
String.prototype.replaceAt=function(index, char) {return this.substr(0, index) + char + this.substr(index+char.length);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParam(name) { | |
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// precompiled backbone underscore template helper | |
var getTemplate = function (id) { | |
return _.template( $('#'+ id).html() ); | |
}; | |
// doesn't call underscore | |
var uncompiledTemplate = function (id) { | |
return $('#'+ id).html(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Car = function () { | |
this.attributes = { | |
color: null, | |
wheels: 4, | |
speed: null | |
}; | |
}; | |
Car.prototype.set = function (key, value) { | |
this.attributes[key] = value; |
OlderNewer