- Air Berlin - 50 EUR - get 32kg http://www.airberlin.com/en-DE/site/flug_gepaeck_luggage.php#sondergepaeck
- Tiger http://www.tigerairways.com/au/en/fees2.php
- AirAsia - 50-100 AUD - http://www.airasia.com/ot/en/flightinfo/feeschedule.page
- KLM http://www.klm.com/travel/de_en/prepare_for_travel/baggage/excess/bagagge_piececoncept.htm
- Virgin Australia - just an additional piece of baggage http://www.virginaustralia.com/eu/en/plan/baggage/checked-baggage/#international-short-haul
- Virgin Atlantic - free - http://www.virgin-atlantic.com/us/en/travel-information/baggage/sports-equipment.html
- Qatar - 23kg normal, 10kg for bike, US$13/kg over that
- Finnair
| # Serve images and stylesheets (but not JS files) from a CDN | |
| config.action_controller.asset_host = Proc.new {|source| | |
| source !~ /\.js$/ ? "mycdn.com" : nil | |
| } |
By default the Rails 3 asset pipeline uses the Uglifier gem to optimize and minify your Javascript. One of its many optimisations is to remove all whitespace, turning your Javascript into one very long line of code.
Whist removing all the newlines helps to reduce the file size, it has the disadvantage of making your Javascript harder to debug. If you've tried to track down Javascript errors in minified Javascript files you'll know the lack of whitespace does make life harder.
Luckily there is a simple solution: to configure Uglifier to add newlines back into the code after it performs its optimisations. And if you're serving your files correctly gzip'd, the newlines add only a small increase to the final file size.
You can configure Uglifier to add the newlines by setting the following in your Rails 3 config/production.rb file:
| require File.expand_path('../boot', __FILE__) | |
| require 'rails/all' | |
| # Silence deprecation warnings until Heroku stops injecting plugins into | |
| # vendor/plugins | |
| if Rails.env.production? | |
| ActiveSupport::Deprecation.silenced = true | |
| end |
| class MyApp.Router extends Backbone.Router | |
| hasPushState: window.history and window.history.pushState | |
| # Override the navigate function to remove Backbone's #hash fallback for | |
| # non-pushState browsers. Instead we just navigate to the new location using | |
| # window.location | |
| navigate: (fragment, trigger) -> | |
| if @hasPushState | |
| super(arguments...) |
| # Additional methods for Goliath::TestHelper to make simple Goliath testing | |
| # simple. You might need the other syntax for testing gnarly stuff, but I've | |
| # yet to need it. To use, just include this in your spec_helper.rb. | |
| # | |
| # Your spec must respond to #api and return the Goliath API class to test. | |
| # | |
| # @example | |
| # describe MyAPI do | |
| # let(:api) { MyAPI } | |
| # describe "GET /" do |
| # re. commit | |
| # https://github.com/rails/rails/commit/0d3615f04c79f6e90d8ab33fdfc920b8faac9cb8 | |
| # | |
| # Example of the slowdown if you `require 'tzinfo'` every time Time.find_zone is called | |
| # | |
| # This became a big problem when unmarshal'ing TimeWithZone objects, in say a Rails action, from memcache. 500ms was added to every request. | |
| # | |
| # e.g. of the problem: | |
| # | |
| # ActiveSupport::TimeWithZone#marshal_load calls |
| def pluralize(number, singular) | |
| <<-HTML | |
| <span class="#{singular.downcase}"> | |
| #{number} | |
| <span>#{number == 1 ? singular : singular.pluralize}</span> | |
| </span> | |
| HTML | |
| end |
| # An example of rolling your own simple content_for helper in Sinatra | |
| helpers do | |
| def content_for(key, &block) | |
| @content ||= {} | |
| @content[key] = capture_haml(&block) | |
| end | |
| def content(key) | |
| @content && @content[key] | |
| end | |
| end |
(a gist based on the old toolmantim article on setting up remote repos)
To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.
This is somewhat of a follow-up to the previous article setting up a new rails app with git.
Set up the new bare repo on the server: