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
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder | |
http://www.macworld.com/article/1164668/select_and_copy_text_within_quick_look_previews.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
/* | |
Hide elements from visual browsers, keep content accessible. | |
Taken from http://html5boilerplate.com/ | |
*/ | |
.no-visual { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; |
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
javascript:!function(){"true"!==document.body.contentEditable?(document.body.contentEditable="true",document.documentElement.style.borderTop="15px solid red"):(document.body.contentEditable="false",document.documentElement.style.borderTopWidth="0px")}(); | |
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 initSessionPropertyOnce = function(prop,defaultVal) { | |
var savedValue = sessionStorage.getItem(prop); | |
if (!savedValue) { | |
sessionStorage.setItem(prop,defaultVal); | |
$scope.switchTabTo(defaultVal); | |
return defaultVal; | |
} else { | |
$scope.switchTabTo(savedValue); | |
return savedValue; | |
} |
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
// Great explanation of closures (plus I love this style of documentation): | |
// from http://stackoverflow.com/a/6472397 answer by Jacob Swartwood | |
// ------------------------------------------------------------------- // | |
// I'm a big fan of analogy and metaphor when explaining difficult concepts, so let me try my hand with a story. | |
// Once upon a time: | |
// There was a princess... |
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
// Nice number formatting | |
// by Chris Quick | |
// http://devspoint.wordpress.com/2011/01/07/two-quick-javascript-snippets-i-use-everyday/ | |
function addCommas(nStr) | |
{ | |
nStr += ''; | |
x = nStr.split('.'); | |
x1 = x[0]; | |
x2 = x.length > 1 ? '.' + x[1] : ''; |
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 style="background-color: #e64f35; border-radius: 50%; width: 160px; height: 160px; padding: 3px; margin: 2rem; border: 1rem solid #e64f35;color:#fff; font-size:3rem; text-align:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;"> | |
<div> | |
56<small>%</small> | |
</div> | |
</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
<style> .ns-newcsslib .grid--debug {outline: 5px solid #f00;height: 100px;} .ns-newcsslib .grid--debug [class^="col-"] {height:100%; background-color:#fee; display:block;}</style> | |
<div class="grid grid--debug"> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> <div class="col-1"> </div> </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
// Module pattern | |
ABC = ABC || {}; | |
ABC.ModuleName = (function() { | |
function render_donut(el) { | |
dostuff(); | |
} | |
function init(){ |
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
Include | |
{% include footer.html %} | |
Include with params | |
{% include footer.html param="value" variable-param=page.variable %} | |
{{ site.time | date_to_string }} | |
07 Nov 2008 | |
Include a gist -- filename optional. |