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
# Given a model, self, with these attributes: | |
# value :float | |
# lean_mass_value :float | |
# fat_mass_value :float | |
# fat_percentage :float | |
# | |
# User optionally inputs the last three (lean_mass, fat_mass, fat_percentage), so we can determine missing values if we have at least one of the last three in addition to the value attr. | |
# Is there a better way to express this? | |
def calculate_all_known_values |
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
function URI(e) { | |
e || (e = ""); | |
var t = /^(?:([^:\/?\#]+):)?(?:\/\/([^\/?\#]*))?([^?\#]*)(?:\?([^\#]*))?(?:\#(.*))?/, | |
n = e.match(t); | |
this.scheme = n[1] || null, this.authority = n[2] || null, this.path = n[3] || null, this.query = n[4] || null, this.fragment = n[5] || null | |
}(function () { | |
Stripe.setPublishableKey(PRELOAD.stripe_settings.public_key) | |
}).call(this), PRELOAD.intercom_settings && (window.intercomSettings = PRELOAD.intercom_settings, $.extend(window.intercomSettings, { | |
widget: { | |
activator: "#intercom", |
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
$.ajaxSetup | |
xhrFields: | |
withCredentials: true | |
$(document).ajaxSend (event, jqxhr, settings)-> | |
jqxhr.setRequestHeader 'X-CSRF-Token', Embed.get 'csrf-token' | |
jqxhr.withCredentials = true # so the browser appends session headers in CORS requests | |
$(document).ajaxComplete (event, jqxhr, settings)-> | |
if jqxhr.getResponseHeader('X-CSRF-Token')? |
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
--- /Users/sycr/code/embertest/dist/ember.js Fri Jul 26 12:00:26 2013 | |
+++ /Users/sycr/code/embertest/dist/ember.prod.js Fri Jul 26 12:00:26 2013 | |
@@ -1,160 +1,3 @@ | |
-// Version: v1.0.0-rc.3.1 | |
-// Last commit: 1919625 (2013-07-25 18:13:08 -0400) | |
- | |
- | |
-(function() { | |
-/*global __fail__*/ | |
- |
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 sortedCoupons = [] | |
var coupons = Object.keys(Store.Menu.Coupons) | |
coupons.forEach(function(coupon, index, coupons) { | |
data = Store.Menu.Coupons[coupon] | |
sortedCoupons.push(data) | |
}) | |
sortedCoupons.sort(function (a, b) { |
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
task :scrape_blog_to => :environment do | |
blog_to = "http://www.blogto.com" | |
lists = ["/toronto/the_best_antique_stores_in_toronto/", "/toronto/the_best_art_supply_stores_in_toronto/", "/toronto/the_best_new_art_galleries_in_toronto_2008/", "/toronto/the_best_new_art_galleries_in_toronto_2009/", "/toronto/best_place_to_buy_a_suit_in_toronto/", "/toronto/the_best_baby_stores_in_toronto/", "/toronto/the_best_backyard_patios_in_toronto/", "/toronto/the_best_barber_shops_in_toronto/", "/toronto/the_best_bespoke_tailors_in_toronto/", "/toronto/the_best_bike_repair_shops_in_toronto/", "/toronto/the_best_bike_stores_in_toronto/", "/toronto/the_best_blues_bars_in_toronto/", "/toronto/the_best_bookstores_in_toronto/", "/toronto/the_best_boxing_gym_in_toronto/", "/toronto/the_best_bridal_stores_in_toronto/", "/toronto/the_best_bridesmaid_dresses_in_toronto/", "/toronto/the_best_card_paper_and_stationery_shops_in_toronto/", "/toronto/the_best_catering_companies_in_toronto/", "/toronto/the_best_comic_shops_in_toronto/" |
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
Three Bugs from views with data bound from unknown places, | |
Seven from broken API calls and broken test suites, | |
Nine from the endless objects doomed to die by GC thrashing, | |
One from the Application Object and its initializer, | |
In the Land of Ember where the bugs lie, | |
One controller to rule them all, one controller to find the models, | |
One controller to bring them all and in a renderedBuffer bind them | |
In the Land of Ember where the bugs lie. |
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 input = [5, 1, 2, 3], | |
digit_count = input.shift() | |
digit_count * 4 + input[0] * 2 - input[1] * 2 + input[2] |
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
import Session from 'appkit/models/session'; | |
export default Ember.Application.initializer({ | |
name: 'currentUser', | |
initialize: function(container, app) { | |
// Register a new container | |
container.register('session:current-user', Session); | |
// Load the current user | |
container.lookup('session:current-user').find(); |
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
https://github.com/emberjs/ember.js/issues/2386 | |
https://github.com/emberjs/ember.js/issues/2907 | |
https://github.com/emberjs/ember.js/issues/3173 | |
https://github.com/emberjs/ember.js/issues/3732 | |
https://github.com/emberjs/ember.js/issues/4150 | |
https://github.com/emberjs/ember.js/issues/4331 | |
https://github.com/emberjs/ember.js/issues/4422 | |
https://github.com/emberjs/ember.js/pull/2461 | |
https://github.com/emberjs/ember.js/pull/4226 |