Rails 3.0 introduced support for routing constrained by subdomains.
A subdomain can be specified explicitly, like this:
match '/' => 'home#index', :constraints => { :subdomain => 'www' }
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| < | |
| %3C | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| # This will cause full debug output to go to the console | |
| >>> import boto | |
| >>> boto.set_stream_logger('foo') | |
| >>> ec2 = boto.connect_ec2(debug=2) |
| (function() { | |
| Backbone.Model.prototype._save = Backbone.Model.prototype.save; | |
| Backbone.Model.prototype.save = function(attrs, options) { | |
| var that = this; | |
| if (!options) { options = {}; } | |
| if (this.savingNewRecord) { | |
| // store or replace last PUT request with the latest version, we can safely replace old PUT requests with new ones | |
| // but if there are callbacks from a previous PUT request, we need to make sure they are all called as well | |
| _(['success','error']).each(function(event) { | |
| // convert all callbacks to a single array of callbacks) |
| // ==UserScript== | |
| // @name Gmail "From" Address auto-selector | |
| // @version 0.18 | |
| // @description Looks in your "To" field and sees if you have an email address in your "From" addresses with the same domain. Changes <select> onblur | |
| // @author Andrew Sutherland, https://github.com/asuth | |
| // @include http://mail.google.com/* | |
| // @include https://mail.google.com/* | |
| // @include http://*.mail.google.com/* | |
| // @include https://*.mail.google.com/* | |
| // ==/UserScript== |
| import csv | |
| from github2.client import Github | |
| # api settings for github | |
| git_username = 'your_git_username' | |
| git_api_token = 'your_git_api_token' | |
| git_repo = 'username/repo_name' | |
| # import all issues as this story type | |
| pivotal_story_type = 'Bug' |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
| from fabric.api import * | |
| """ | |
| Base configuration | |
| """ | |
| env.project_name = '$(project)' | |
| env.database_password = '$(db_password)' | |
| env.site_media_prefix = "site_media" | |
| env.admin_media_prefix = "admin_media" | |
| env.newsapps_media_prefix = "na_media" |