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
/** | |
* Device Resolution @media snippet. | |
* Target devices by the CSS resolution property. IE10 doesn't support ppx, so convert to dpi by | |
* multiplying the dppx value by 96. | |
*/ | |
@media (min-resolution: 2ppx),(min-resolution: 192ppi) { | |
/* add properties here */ | |
} |
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
<div class="container"> | |
<h1>Example Header</h1> | |
</div> |
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 inArray(array:Array, search_value:String) { | |
for (var i in array) { | |
if (array[i] == search_value) { | |
return true; | |
} | |
} | |
} |
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
/* YUI inline-block grid solution */ | |
.yui3-g { | |
letter-spacing: -0.31em; /* Webkit: collapse white-space between units */ | |
*letter-spacing: normal; /* reset IE < 8 */ | |
*word-spacing: -0.43em; /* IE < 8: collapse white-space between units */ | |
text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */ | |
} | |
.yui3-u { | |
display: inline-block; |
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
// Sourced from: http://css-tricks.com/centering-in-the-unknown/ | |
@mixin element-align-center($child-element, $width-of-child) { | |
& { | |
vertical-align: middle; | |
display:inline-block; | |
} | |
&:before { | |
content: ""; | |
display: inline-block; | |
height: 100%; |
Original source can be found on StackOverflow.
A being the first commit:
git rebase -i A
It is possible to start like that if you continue with edit rather than squash:
edit e97a17b B
pick asd314f C
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 Podcast(title, url) { | |
// Forces the new instance so that 'this' has context inside Podcast | |
if(false === (this instanceof Podcast)) { | |
return new Podcast(title, url); | |
} | |
this.title = title; | |
this.url = url; | |
this.toString = 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
function namespace(namespaceString) { | |
var parts = namespaceString.split('.'), | |
parent = window, | |
currentPart = ''; | |
for(var i = 0, length = parts.length; i < length; i++) { | |
currentPart = parts[i]; | |
parent[currentPart] = parent[currentPart] || {}; | |
parent = parent[currentPart]; | |
} |
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 test = null; | |
function NumberException(message){ | |
this.name = 'NumberException'; | |
this.message = message | |
} | |
function isPositiveNumber(num) { | |
if (typeof num !== 'number') | |
throw new NumberException('Value entered is not a number'); |
OlderNewer