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
| class ReportOpenExperimentsToYappieJob | |
| include Sidekiq::Worker | |
| sidekiq_options :queue => :yappie | |
| include Sidetiq::Schedulable | |
| recurrence { daily.hour_of_day(9) } | |
| def perform | |
| active_experiments = Split::Experiment.all.select{ |exp| exp.winner.nil? } | |
| active_experiments.each do |experiment| |
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
| FooController = Em.Controller.extend({ | |
| queryParamBindings: ['bar'], | |
| bar: 'baz', | |
| widgets: Ember.computed.sort('content', 'bar') | |
| }) | |
| FooController = Em.Controller.extend({ | |
| queryParamBindings: ['bar:barbados'], | |
| bar: 'baz', |
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
| get = Ember.get | |
| decamelize = Ember.String.decamelize | |
| classify = Ember.String.classify | |
| window.MinispadeResolver = Ember.DefaultResolver.extend | |
| logFailedLookups: false | |
| resolveTemplate: (parsedName)-> | |
| resolvedTemplate = @_super(parsedName) | |
| unless resolvedTemplate | |
| template_key = "#{decamelize(parsedName.fullNameWithoutType).replace(/\./, '_')}" |
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
| LOG_LEVEL = 'debug' | |
| Logs everything at a debug level. Defaults to 'warn'. | |
| Outputs: 'Global log level set to "debug". This may be overwhelming. | |
| To focus detailed logging, set log level directly on one of the following: | |
| ROUTER_TRANSITIONS_LOG_LEVEL, ACTIVE_GENERATION_LOG_LEVEL, VIEW_LOOKUP_LOG_LEVEL, ... | |
| When logging is output, the category is included: |
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
| #!/usr/env ruby | |
| require 'rubygems' | |
| require 'active_support' | |
| require 'active_support/core_ext/string' | |
| cc_map = { | |
| page: ['feedEntries', 'mediaWell', 'videosWell', 'crowdPicsImages', 'user', 'videos'], | |
| cover: ['yapp'], | |
| pageEdit: ['page'], |
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 empty, get, set, | |
| __hasProp = {}.hasOwnProperty; | |
| get = Ember.get; | |
| set = Ember.set; | |
| empty = function(obj) { | |
| var key; | |
| for (key in obj) { | |
| if (!__hasProp.call(obj, key)) continue; |
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
| get = Ember.get | |
| decamelize = Ember.String.decamelize | |
| classify = Ember.String.classify | |
| MinispadeResolver = Ember.DefaultResolver.extend | |
| logFailedLookups: true | |
| resolveTemplate: (parsedName)-> | |
| resolvedTemplate = @_super(parsedName) | |
| unless resolvedTemplate | |
| try |
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 start = Yapp.promise(function(deferred) { | |
| console.log("Resolving chain part 1") | |
| deferred.resolve() | |
| }).always(function(){ | |
| return Yapp.promise(function(deferred) { | |
| setTimeout(function(){ | |
| console.log("Resolving chain part 2") | |
| deferred.resolve() | |
| }, 100); | |
| }) |
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
| App.profileEditorController = Em.ObjectController.extend({ | |
| addressBinding: 'content.address' | |
| }); | |
| App.Router = Em.Router.extend({ | |
| root: Em.Route.extend({ | |
| profile: Em.Route.extend({ | |
| route: 'profile', |
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
| (($)-> | |
| $.fn.logoPopup = -> | |
| this.mousedown -> | |
| $(document).bind("contextmenu", (event)-> | |
| true | |
| ) | |
| if event.which == 3 | |
| $('<div id="logo-lightbox-container">').hide().appendTo('body').load('/u/logo', -> | |
| $.easybox("#logo-lightbox-container") | |
| ) |