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
// Selectability: pass true or false | |
// http://stackoverflow.com/questions/2700000/how-to-disable-text-selection-using-jquery | |
$.fn.selectable = (function _selectable(){ | |
var values = [ | |
// Off | |
['on', 'none', false], | |
// On | |
['off','text', $.noop] | |
]; | |
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
Show hidden characters
{ | |
"ensure_newline_at_eof_on_save": true, | |
"font_size" : 10, | |
"tab_size" : 2 | |
} |
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
/** | |
* Fixing shitty WebKit text rendering for thin and quirky fonts | |
*/ | |
html { | |
font-family: 'Quicksand'; | |
font-size: 24px; | |
padding: 1em 5em; | |
-webkit-text-stroke-width: .25px;} |
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
// Create a copy of x without reference back to x | |
function clone(x){ | |
return JSON.parse(JSON.stringify(x)); | |
} | |
// Pass any number of arguments of non-function type. Returns true if they are all identical. | |
function areEqual(){ | |
for(var i = 1, l = arguments.length, x = JSON.stringify(arguments[0]); i < arguments.length; ++i){ | |
if(x !== JSON.stringify(arguments[i])){ | |
return false; |
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
// Optain classnames representing the IE rendering engine: | |
// Makes version-targetted CSS much cleaner | |
var sIEclass = (function determineIEversion(){ | |
// A DOM element to run the test on | |
var oTest = document.createElement('test'); | |
// A table matching tested versions to representative class string | |
var hVersions = { | |
"6" : "ie ltie10 ltie9 ltie8 ltie7 ie6", | |
"7" : "ie ltie10 ltie9 ltie8 ie7", | |
"8" : "ie ltie10 ltie9 ie8", |
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
.fileContainer { | |
overflow: hidden; | |
position: relative; | |
} | |
.fileContainer [type=file] { | |
cursor: inherit; | |
display: block; | |
font-size: 999px; | |
filter: alpha(opacity=0); |
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
/* Javascript to emulate media queries with events and HTML class toggling | |
* to avoid duplication, conflict & waste when implemented via | |
* native CSS implementation + JS feature dependency. | |
* | |
* Depends on jQuery and Cowboy's throttle / debounce plugin: | |
* https://github.com/cowboy/jquery-throttle-debounce | |
*/ | |
(function(){ | |
var options = { |
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
void function $getLines($){ | |
function countLines($element){ | |
var lines = 0; | |
var greatestOffset = void 0; | |
$element.find('character').each(function(){ | |
if(!greatestOffset || this.offsetTop > greatestOffset){ | |
greatestOffset = this.offsetTop; | |
++lines; | |
} |
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
export default x=>document.createElement('a').href=x |
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
// functions passed to later will only execute once the stack has resolved. | |
function later(fn){ | |
return setTimeout(fn,0); | |
} | |
void function executionScope(){ | |
var x = 0; | |
console.log('Log 1: ' + x); | |