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
var Order = Backbone.Model.extend({ | |
}); | |
var HalModel = Backbone.Model.extend({ | |
url: function() { | |
return get("_links").self; | |
}, | |
}); | |
parse: function(response) { |
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
class LessonShow | |
constructor: (@selector) -> | |
$.ajax | |
url: $(@selector).data('json-url') | |
cache: false | |
dataType: 'json' | |
success: @success | |
complete: @complete | |
success: (object) => |
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
- return unless article.promotions.present? | |
%section#associated_freemusic.module.inner | |
%header.sty-plain | |
%hgroup | |
%h3= t('modules.shared.heading.mp3_downloads') | |
- unless current_user | |
%section.signup | |
= link_to "<span class='fg ico-user-silhouette'> </span>#{t("site_header.account_links.sign_up")}".html_safe, janrain_signup_url, :class => "btn sty-blue siz-large with-icon", 'data-lightbox-type' => 'iframe', 'data-lightbox' => janrain_signup_url, 'data-lightbox-width' => '700', 'data-lightbox-height' => '800' | |
= link_to "<span class='fg ico-lock'> </span>#{t('site_header.account_links.sign_in')}".html_safe, janrain_signin_url, :class => "btn sty-gray size-large with-icon", 'data-lightbox-type' => 'iframe', 'data-lightbox' => janrain_signin_url, 'data-lightbox-width' => '700', 'data-lightbox-height' => '800' |
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
.page-header | |
%h2= link_to 'LESSONS', lessons_path | |
.page-wrapper | |
#lesson{ :data => { "json-url" => lesson_url(@lesson, :format => :json) } } | |
.lesson-left | |
.lesson-right | |
%div |
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
class Search | |
attr_accessor :params, :locale, :results | |
def initialize(params, locale) | |
return if params[:search].blank? | |
@params = params | |
@params[:page] ||= "1" | |
@params[:per_page] ||= "10" | |
@locale = Localized::Config.locale_to_site_map[locale].to_s #Hacktastic, should work with locale.to_s | |
self.send(@params[:filter]) |
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
class Search | |
attr_accessor :params, :locale | |
def initialize(params, locale) | |
return if params[:search].blank? | |
@params = params | |
@locale = locale | |
self.send(@params[:filter]) | |
end |
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
%header.hdg-main | |
%hgroup | |
%h3 | |
%span.taggy #{idx + 1}: | |
= pp.user.display_name | |
.byline | |
= "#{t('pages.promotions.text.submitted_on')}:" | |
= tz_date(pp.created_at) | |
%details | |
%summary.pie-clearfix |
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
import sublime, sublime_plugin, os | |
class TailCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
from datetime import datetime | |
filtertext = "FLO" | |
# open sublime console | |
self.view.window().run_command("show_panel", { "panel": "console", "toggle": "true" }) |
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
# Initial State | |
$ heroku ps | |
Process State Command | |
------- --------- ------------------------------------ | |
web.1 up for 6h bundle exec thin start -p $PORT -e.. | |
web.2 up for 6h bundle exec thin start -p $PORT -e.. | |
# Scale issued to no effect | |
$ heroku ps:scale worker=1 |
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
jQuery -> | |
if $("body.lessons.show").length > 0 | |
new LessonShow("#lesson") | |
$(document).keypress (e) -> | |
if e.which is 32 and !$(e.target).is('input, textarea') and $(".lesson-video video").length > 0 | |
video = $(".lesson-video video")[0] | |
if video.paused | |
sublimevideo.play() | |
else |