Rails 3.0 introduced support for routing constrained by subdomains.
A subdomain can be specified explicitly, like this:
match '/' => 'home#index', :constraints => { :subdomain => 'www' }
(function($){ | |
$.alphaRange = function(from , to , onlyLetters) { | |
var startLetter = from || 'A', | |
endLetter = to || 'Z', | |
start = startLetter.charCodeAt(0), | |
end = endLetter.charCodeAt(0), | |
length = end - start, | |
letter = 0, |
def inspect data , depth = 0 | |
data.each do | key , value | | |
if value.class == Hash | |
spacing = '' | |
depth.times { spacing << '-' } | |
puts spacing+' '+key.to_s | |
inspect value , depth+1 | |
else | |
spacing = '' |
require 'uri' | |
require 'net/http' | |
class Chunked | |
def initialize(data, chunk_size) | |
@size = chunk_size | |
if data.respond_to? :read | |
@file = data | |
end | |
end |
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
Connect PS3 controller to Mac with USB cable.
Enable Bluetooth.
CarrierWave::ProcessingError (Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: Command ("mogrify -crop '217x217+0+136' /var/folders/1_/fj3rk_750w32l91pxp59xz180000gn/T/mini_magick20130913-12950-ul75bn.jpg") failed: {:status_code=>1, :output=>"mogrify: invalid argument for option `'217x217+0+136'': -crop @ error/mogrify.c/MogrifyImageCommand/4227.\n"}): |
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.0' | |
# Use mysql as the database for Active Record | |
gem "mysql2" | |
# Adds foreign key support to rails Active Record | |
# https://github.com/matthuhiggins/foreigner |
# Setting up a local solr instance on a mac | |
# install solr with homebrew | |
brew install solr | |
# create the base solr index directory | |
mkdir -p /data/solr | |
# make sure you can write to the solr logs | |
sudo chown -R `whoami` /usr/local/Cellar/solr/ |
function(doc) { | |
if ( doc.collection === "foobar") { | |
for(var i = 0; i < doc.belongsTo.length; ++i) { | |
var belongTo = doc.belongsTo[i]; | |
if ( !!belongTo.length) { | |
emit(belongTo); | |
} | |
} | |
} | |
} |
I hereby claim:
To claim this, I am signing this object: