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
| <% | |
| catchExports.foo = function(buf, text) { | |
| %><h1><%= text %></h1><% | |
| } | |
| catchExports.bar = function(buf, text) { | |
| %><p><%= text %></p><% | |
| } |
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
| // old API | |
| $('[data-track-click]').each(function(){ | |
| var $el = $(this); | |
| var params = ['_trackEvent'].concat( | |
| $el.data('track-click').split(',') | |
| ); | |
| $el.click(function(){ | |
| _gaq.push(params); | |
| }); |
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
| /*! normalize.css v3.0.1 | MIT License | git.io/normalize */ | |
| html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} | |
| body{margin:0} | |
| article,aside,details,figcaption,figure, | |
| footer,header,hgroup,main,nav,section,summary{display:block} | |
| audio,canvas,progress,video{display:inline-block;vertical-align:baseline} | |
| audio:not([controls]){display:none;height:0}[hidden],template{display:none} | |
| a{background:0 0} | |
| a:active,a:hover{outline:0} | |
| abbr[title]{border-bottom:1px dotted} |
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
| window.ns = (function(){ | |
| var modules = {}; | |
| function _ns(name, initializer) { | |
| if (initializer) { | |
| return modules[name] = function() { | |
| var module = { | |
| exports: {} | |
| }; | |
| initializer(module.exports, module); | |
| modules[name] = 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
| do (exports = window.baconSwipes = {}) -> | |
| getPos = (e) -> | |
| source = (if e.originalEvent.touches | |
| e.originalEvent.touches[0] | |
| else | |
| e.originalEvent) | |
| x: source.clientX | |
| y: source.clientY | |
| event: e |
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
| Bacon.fromBinder (sink) -> | |
| request = | |
| window.requestAnimationFrame or | |
| window.webkitRequestAnimationFrame or | |
| window.mozRequestAnimationFrame or | |
| window.oRequestAnimationFrame or | |
| window.msRequestAnimationFrame or | |
| (f) -> window.setTimeout(f, 1000 / 60) | |
| subscribed = true | |
| handler = -> |
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="js-spoiler"> | |
| <button class="js-toggle">скрыть/показать</button> | |
| <p class="js-content">контент контент контент</p> | |
| </div> | |
| catbug """ | |
| .js-spoiler | |
| .js-toggle | |
| .js-content | |
| """, -> |
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()%7Bvar%20script%3Ddocument.createElement(%27script%27)%3Bscript.src%3D%27https://gist.github.com/raw/4475306/readhelp.js%3F%27%2BMath.floor((%2Bnew%20Date)/(864e5))%3Bdocument.body.appendChild(script)%3B%7D)() |
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
| .wrap { | |
| width: 1000px; | |
| margin: 0 auto; | |
| } | |
| p, img { | |
| width: 500px; | |
| margin: .5em auto; | |
| display: block; | |
| } | |
| img { |
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 'AjaxValidation', (M) -> | |
| M.tree """ | |
| form | |
| """ | |
| M.events """ | |
| ajax:error root showErrors | |
| ajax:beforeSend root hideErrors | |
| """ | |
| M.methods | |
| showErrors: (__1, __2, errors) -> |