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
| /* | |
| * Auto resizing textarea | |
| * Usage: <textarea class="autoresize"></textarea> | |
| */ | |
| var textareaAutoResize = function textareaAutoResize(minHeight){ | |
| var txt = $('.autoresize'), | |
| hiddenDiv = $(document.createElement('div')), | |
| content = null, | |
| mH = minHeight || 50; | |
| txt.css({overflow:'hidden',minHeight:mH}); |
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
| document.addEventListener('keydown', function (event) { | |
| var esc = event.which == 27, | |
| nl = event.which == 13, | |
| el = event.target, | |
| input = el.nodeName != 'INPUT' && el.nodeName != 'TEXTAREA', | |
| data = {}; | |
| if (input) { | |
| if (esc) { | |
| // restore state |
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
| body { | |
| padding: 100px; | |
| font-size: 62.5%; | |
| } | |
| .loading { | |
| font: 16px Monaco; /* no fallback cuz spacing would probably be off... */ | |
| width: 6.1em; /* Was hoping 1 char = 1 em but didn't work out quite */ | |
| overflow: hidden; |
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 addClass = function addClass(_element, _classes) { | |
| var classList, item, _i, _len; | |
| classList = _element.classList; | |
| for (_i = 0, _len = _classes.length; _i < _len; _i++) { | |
| item = _classes[_i]; | |
| classList.add(item); | |
| } | |
| return _element; | |
| }; |
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 domCheck = function(){ | |
| if(!document.body) return setTimeout(domCheck, 1); | |
| //do moar 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
| var Loader = function () { } | |
| Loader.prototype = { | |
| require: function (scripts, callback) { | |
| this.loadCount = 0; | |
| this.totalRequired = scripts.length; | |
| this.callback = callback; | |
| for (var i = 0; i < scripts.length; i++) { | |
| this.writeScript(scripts[i]); | |
| } |
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
| // ====================== | |
| // FlexGrid | |
| // ====================== | |
| // Usage : | |
| // nb of column, column width, column gutter, min-width, max-width, responsive, fluid/fixed | |
| // @include flexGrid(12, 60, 20, 640px, 1024px, true) | |
| @mixin flexGrid($grid-columns: 12, $grid-column-with:60, $grid-column-margin: 20, |
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
| /* Fix webkit percent bug */ | |
| @media screen and (-webkit-min-device-pixel-ratio:0) and (min-width: 767px){ | |
| .row>[class$="columns"]:last-of-type{ | |
| display: table-cell; | |
| float: none;width: auto; | |
| margin:0; | |
| } | |
| .row>[class$="columns"]:nth-last-of-type(2){ | |
| margin-right:4.4%; |
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
| /* Create variables [optional] */ | |
| @basefont: 14; // in pixels | |
| @baseline: 20; // in pixels | |
| /* Create a converter namespace [optional] */ | |
| #pxtoem { | |
| /* Create convert mixin [required] */ | |
| .font-size( @target: @basefont, @context: @basefont ) { | |
| font-size: (@target / @context) + 0em; | |
| } |
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
| # show/hide hidden files | |
| hidden() { | |
| if [ "$(defaults read com.apple.finder AppleShowAllFiles)" = 0 ] | |
| then defaults write com.apple.finder AppleShowAllFiles 1 | |
| else defaults write com.apple.finder AppleShowAllFiles 0 | |
| fi | |
| killall Finder | |
| } |