This file contains 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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
/* Modular syntax using the 3.3 at-root syntax. */ | |
.Component { | |
border: 1px; | |
@at-root #{&}-child { |
This file contains 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
String.prototype.commafy = function () { | |
return this.replace( | |
/^(-?\d+)(\d{3}(\.\d+)?)$/, | |
function (_, a, b) { | |
return a.commafy() + ',' + b; | |
} | |
); | |
}; |
This file contains 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
public class OurContext : DbContext | |
{ | |
public string ClientKey { get; private set; } | |
/// We make use of the DbContext constructor overload that accepts a | |
/// connection string to connect to. | |
public OurContext(string clientKey) | |
: base(GetClientConnectionString(clientKey)) | |
{ |
This file contains 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 gistPrefix = 'http://gist.github.com/', | |
fileAnchorPrefix = '#file_', | |
// Cache document.write so that it can be restored once all Gists have been | |
// embedded. | |
cachedWrite = document.write, | |
body = $('body'), |
This file contains 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
@media screen and (min-width: 960px) { } |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Templates</title> | |
</head> | |
<body> | |
<div class="greeting"></div> | |
<script class="greeting" type="text/x-jquery-tmpl"> |
This file contains 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
<script type="text/x-jquery-tmpl"> | |
{{each items}} | |
<li>${$value}</li> | |
{{/each}} | |
<!-- is equivalent to --> | |
{{each(i, item) items}} | |
<li>${item}</li> | |
{{/each}} |
This file contains 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
<head> | |
<link rel="stylesheet" href="base.css" /> | |
<link rel="stylesheet" href="mobile.css" media="max-width: 320px" /> | |
<!-- OR --> | |
<style type="text/css"> | |
/* base styles go here */ | |
@media (max-width: 320px) |
This file contains 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($) { | |
$.fn.enable = function() { | |
// Enable each selected element by removing its 'disabled' attribute. | |
return this.each(function() { | |
$(this).removeAttr('disabled'); | |
}); | |
}; | |
$.fn.disable = function() { |
This file contains 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 message = 'Hello!'; | |
(function() { | |
var message = 'Hi!'; | |
alert(message); | |
})(); |
NewerOlder