- see https://gist.github.com/machty/5723945 for the latest API (unlikely to change from now on)
- latest Ember build: https://machty.s3.amazonaws.com/ember/ember-async-routing-10.js
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
# yes, sometimes you need to do this. you get pilloried in a forum if you | |
# ask about it, though! | |
# this code taken from | |
# http://wholemeal.co.nz/blog/2011/04/05/rendering-from-a-model-in-rails-3/ | |
class MyModel < ActiveRecord::Base | |
# Use the my_models/_my_model.txt.erb view to render this object as a string | |
def to_s | |
ActionView::Base.new(Rails.configuration.paths.app.views.first).render( |
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
•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) |
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
mv /usr/local/bin/g++ /usr/local/bin/g++.bak && ln -s /usr/bin/g++-4.2 /usr/local/bin/g++ | |
rm /usr/local/bin/g++ && mv /usr/local/bin/g++.bak /usr/local/bin/g++ |
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
# In your Backbone app, wherever you want -- we put this in lib/ajax_settings.coffee | |
define [ | |
'backbone', | |
'cookie' # This is https://github.com/js-coder/cookie.js, | |
# we have a bower-compatible fork at https://github.com/thinkthroughmath/cookie.js | |
], (Backbone, cookie) -> | |
init: -> | |
# This overrides all ajax requests sent through Backbone. We could have set this in jQuery | |
# since Backbone ultimately calls the jQuery ajax functions, but we decided we shouldn't be | |
# doing ajax requests outside of Backbone anyway. |
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
es | |
version: 0.0.23 | |
Missing template processorError: Missing template processor | |
at module.exports.preprocessTemplates (/Users/adolfo/code/ember-cli/lib/preprocessors.js:44:11) | |
at EmberApp.<anonymous> (/Users/adolfo/code/ember-cli/lib/broccoli/ember-app.js:83:25) | |
at EmberApp.memoized [as appAndDependencies] (/Users/adolfo/code/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28) | |
at EmberApp.<anonymous> (/Users/adolfo/code/ember-cli/lib/broccoli/ember-app.js:122:41) | |
at EmberApp.memoized [as javascript] (/Users/adolfo/code/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28) | |
at EmberApp.toArray (/Users/adolfo/code/ember-cli/lib/broccoli/ember-app.js:150:10) | |
at EmberApp.<anonymous> (/Users/adolfo/code/ember-cli/lib/broccoli/ember-app.js:157:26) |
The goals of the Trade minigame are twofold:
- Get the most tradepower in your home tradenode
- Get the most tradepower in nodes that point to your trade node
The tradepower formula is fairly complex, but the important modifiers are: Local Provincial Tradepower, Mercantilism and Trade Efficiency. Any event that gives Mercantilism needs to be taken at all costs. It's amazing. Seriously. 1.00 Merchantilism can mean the difference of 3 duckets/month.
Merchants are the Envoy for trade. You start off with 2 and get one from Expansion Ideas, 2 from Trade Ideas, 1 from Merchant Republic, 1 for every major trade company, and 1 from Thalassocracy. Merchants can do two things: Collect from tradenode and transfer trade power.
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
# spec/support/webpack.rb | |
module WebpackTestBuild | |
TS_FILE = Rails.root.join("tmp", "webpack-spec-timestamp") | |
class << self | |
attr_accessor :already_built | |
end | |
def self.run_webpack | |
puts "running webpack-test" |