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
| $('nav li a').each => | |
| this.addClass('current') if this.text() == $('h1').text() |
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
| $('tr.clickable').on 'click', -> | |
| document.location.href = $(this).data('url') |
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
| /** | |
| * The Twitalinkahashifyer! | |
| * http://www.dustindiaz.com/basement/ify.html | |
| * Eg: | |
| * Ify.clean('your tweet text'); | |
| */ | |
| Ify = { | |
| link: function(tweet) { | |
| return tweet.replace(/\b(((https*\:\/\/)|www\.)[^\"\']+?)(([!?,.\)]+)?(\s|$))/g, function(link, m1, m2, m3, m4) { | |
| var http = m2.match(/w/) ? 'http://' : ''; |
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
| # Implements the Paul Irish IE conditional comments HTML tag--in HAML. | |
| # http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ | |
| # http://ricostacruz.com/2010/haml_and_ie_compatibility.html | |
| def cc_html(options={}, &blk) | |
| attrs = options.map { |(k, v)| " #{h k}='#{h v}'" }.join('') | |
| [ "<!--[if lt IE 7 ]> <html#{attrs} class='ie6'> <![endif]-->", | |
| "<!--[if IE 7 ]> <html#{attrs} class='ie7'> <![endif]-->", | |
| "<!--[if IE 8 ]> <html#{attrs} class='ie8'> <![endif]-->", | |
| "<!--[if IE 9 ]> <html#{attrs} class='ie9'> <![endif]-->", | |
| "<!--[if (gt IE 9)|!(IE)]><!--> <html#{attrs}> <!--<![endif]-->", |
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).on 'page:change', -> | |
| if window._gaq? | |
| _gaq.push ['_trackPageview'] | |
| else if window.pageTracker? | |
| pageTracker._trackPageview() |
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
| /\[wufoo username="(\S+)" formhash="(\S+)" autoresize="(\S+)" height="(\S+)" header="(\S+)" ssl="(\S+)"\]/ |
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
| box: wercker/ruby | |
| build: | |
| steps: | |
| # Execute the bundle install step, a step provided by wercker | |
| - bundle-install | |
| # Execute a custom script step. | |
| - script: | |
| name: middleman build | |
| code: bundle exec middleman build --verbose | |
| deploy: |
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
| source 'https://rubygems.org' | |
| gem 'rack' | |
| gem 'rack-legacy' |
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 Service | |
| extend ActiveSupport::Concern | |
| included do | |
| def self.call(*args) | |
| new(*args).call | |
| end | |
| end | |
| end |
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 HashidsSupport | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def hashids | |
| Hashids.new(table_name, 6) | |
| end | |
| def encode_id(id) | |
| hashids.encode(id) |
OlderNewer