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
require 'bundler/setup' | |
require 'sass' | |
require 'compass' | |
require 'rake-pipeline' | |
require 'listen' | |
require 'rack/lock' | |
require 'ruby-debug' | |
require 'securerandom' | |
STDOUT.sync = true |
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
require "rake-pipeline-web-filters" | |
class ClosureFilter < Rake::Pipeline::Filter | |
def generate_output(inputs, output) | |
inputs.each do |input| | |
output.write "(function() { #{input.read} })()" | |
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
class Organization | |
def to_param | |
"42" | |
end | |
def saved? | |
rand > 0.5 | |
end | |
end | |
class OrganizationCreator |
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
require 'bundler/setup' | |
require 'sass' | |
require 'compass' | |
require 'rake-pipeline' | |
require 'listen' | |
require 'rack/lock' | |
require 'ruby-debug' | |
require 'securerandom' | |
require 'ruby_gntp' |
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") | |
) |
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
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
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 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
#!/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'], |