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
| /** | |
| * Use listenTo/stopListening from Backbone.js with any DOM element | |
| * | |
| * Example: | |
| * | |
| * view.listenTo(asEvents(window), "resize", handler); | |
| * | |
| * and the listener will be remove automatically on view.remove() or | |
| * view.stoplistening() | |
| * |
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 hidden characters
| { | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", | |
| "*.dds", |
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
| %clearfix { | |
| &:before, | |
| &:after { | |
| content: ""; | |
| display: table; | |
| } | |
| &:after { | |
| clear: both; | |
| } | |
| } |
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
| //Observe input events | |
| // Do your stuff after 1 seconds of last user input | |
| $('.observe').live('input keyup', function () { | |
| var $this = $(this); | |
| var delay = 500; // 0.5 seconds delay after last input | |
| clearTimeout($this.data('timer')); | |
| $this.data('timer', setTimeout(function () { | |
| $this.removeData('timer'); | |
| // Do your stuff after 0.5 seconds of last user input |
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
| /** | |
| * Based conceptually on the _.extend() function in underscore.js ( see http://documentcloud.github.com/underscore/#extend for more details ) | |
| * Copyright (C) 2012 Kurt Milam - http://xioup.com | Source: https://gist.github.com/1868955 | |
| * | |
| * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
| * | |
| * You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. | |
| **/ |
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
| <snippet> | |
| <content><![CDATA[ | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> | |
| <link rel="shortcut icon" href="/favicon.ico"> | |
| <link rel="apple-touch-icon" href="/apple-touch-icon.png"> | |
| <link rel="stylesheet" href="style.css"> |
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
| <snippet> | |
| <content><![CDATA[ | |
| console.log("${1:message}"); | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>log</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>source.js</scope> | |
| </snippet> |
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 highestCol = Math.max($('#element1').height(),$('#element2').height()); | |
| $('.elements').height(highestCol); |
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 3.8.1 (build 5795) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ | |
| html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000}#yui3-css-stamp.cssreset{display:none} |
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($) { | |
| var o = $( {} ); | |
| $.each({ | |
| on: "submit", | |
| trigger: "publish", | |
| off: "unsibscribe" | |
| }, function(key, api) { | |
| $[api] = function() { | |
| o[key].apply( o, arguments ); |
NewerOlder