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
Warbler.framework_detection = false | |
Warbler::Config.new do |config| | |
# Files to be included in the webapp. | |
config.dirs = %w[app lib config vendor/gems/dirs vendor/gems/gems vendor/gems/specifications] | |
config.includes << "vendor/gems/environment.rb" | |
config.webxml.booter = :rack | |
config.webxml.rackup = File.read("config.ru") | |
config.webxml.jruby.max.runtimes = 1 # Run threadsafe! ;-D |
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
>> require "rubygems" | |
=> true | |
>> require "spec" | |
=> true | |
>> require "webrat" | |
=> true | |
>> $LOAD_PATH.grep /webrat/ | |
=> ["/Users/bhelmkamp/.rvm/gems/ree/1.8.7/gems/webrat-0.6.rc1/bin", "/Users/bhelmkamp/.rvm/gems/ree/1.8.7/gems/webrat-0.6.rc1/lib"] | |
>> require "webrat/integrations/rspec-rails" | |
=> true |
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
[11:06:16] $ /opt/ruby-1.9.2.pre/bin/gem bundle -V | |
The :vendored_at option is deprecated. Use :path instead. | |
From /Users/bhelmkamp/p/active/rails/Gemfile:4:in `evaluate' | |
The :vendored_at option is deprecated. Use :path instead. | |
From /Users/bhelmkamp/p/active/rails/Gemfile:13:in `block in evaluate' | |
The :vendored_at option is deprecated. Use :path instead. | |
From /Users/bhelmkamp/p/active/rails/Gemfile:13:in `block in evaluate' | |
The :vendored_at option is deprecated. Use :path instead. | |
From /Users/bhelmkamp/p/active/rails/Gemfile:13:in `block in evaluate' | |
The :vendored_at option is deprecated. Use :path instead. |
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
# Write assets to public/assets/XX/YYYYYYYY/filename.ext | |
assets_path "assets" | |
# When including files, look in these directories | |
load_path << "app/stylesheets" | |
load_path << "public/stylesheets" | |
# Declare a CSS asset to be bundled | |
css_asset "content" do | |
include "typography" |
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
Overhead with transaction traces enabled: 18% | |
Overhead without transaction traces enabled: 7% |
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
Overhead with transaction traces enabled: 20% | |
Overhead without transaction traces enabled: 14% |
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
[bhelmkamp@brynary] ~/p/vendor/memcached (master) | |
[11:59:43] $ sudo rake install | |
(in /Users/bhelmkamp/p/vendor/memcached) | |
Cleaning | |
- pkg | |
rm -rf pkg | |
Gemspec generated | |
mkdir -p pkg | |
mkdir -p pkg/memcached-0.16 | |
rm -f pkg/memcached-0.16/BENCHMARKS |
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
NewRelic w/o transactions: | |
$ ab -n 3000 -c 4 http://staging.weplay.com/users/LebronJames | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking staging.weplay.com (be patient) | |
Server Software: nginx |
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
module AutoloadMethod | |
def autoload_method(method_name, filename) | |
self.instance_eval <<-SRC | |
def #{method_name}(*args, &block) | |
require #{filename.inspect} | |
#{method_name}(*args, &block) | |
end | |
SRC | |
end | |
end |
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
class AdFrame < Rails::Rack::Metal | |
def self.call(env) | |
refresher = AdFrameApp.new | |
refresher.call(env) | |
end | |
end | |
class AdFrameApp | |
def call(env) | |
if env["REQUEST_URI"] =~ %r|^/ads/iframe/(.+)$| |