Rails 3.0 introduced support for routing constrained by subdomains.
A subdomain can be specified explicitly, like this:
match '/' => 'home#index', :constraints => { :subdomain => 'www' }
$('#products').append('<%= j render(@products) %>'); | |
<% if @products.next_page %> | |
$('.pagination').replaceWith('<%= j will_paginate(@products) %>'); | |
<% else %> | |
$('.pagination').remove(); | |
<% end %> |
package pt.impresa.iweb.filters.request; | |
import java.io.IOException; | |
import java.text.Normalizer; | |
import java.util.Collections; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.regex.Pattern; |
var utils = function(){ | |
"use strict"; | |
var _class2type = {}; | |
var _type = function( obj ) { | |
return obj == null ? | |
String( obj ) : | |
_class2type[ toString.call(obj) ] || "object"; | |
}; |
fields = [:switch, :sha_ind, :dtdm, :utdm, :ttdm, :actual] | |
def create_struct name, fields | |
Struct.new(name, *fields) | |
end | |
def create_singleton_struct name, fields | |
if Struct::const_defined? name | |
Struct.const_get name | |
else |
After upgrading to Mountain Lion, I got this message when trying to run my local rails server:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Users/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb
##Google Interview Questions: Product Marketing Manager
<Files robot.txt> | |
Order deny,allow | |
Allow from all | |
</Files> | |
Order deny,allow | |
deny from all | |
allow from 8.8.8.8 |
== PostgreSQL | |
Braintree | |
* https://www.braintreepayments.com/braintrust/scaling-postgresql-at-braintree-four-years-of-evolution | |
* http://www.databasesoup.com/2012/04/sharding-postgres-with-instagram.html | |
* http://media.postgresql.org/sfpug/instagram_sfpug.pdf | |
* http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram#_=_ | |
* http://instagram-engineering.tumblr.com/post/40781627982/handling-growth-with-postgres-5-tips-from-instagram |