Skip to content

Instantly share code, notes, and snippets.

LoadModule pagespeed_module /usr/lib/httpd/modules/mod_pagespeed.so
# Only attempt to load mod_deflate if it hasn't been loaded already.
<IfModule !mod_deflate.c>
LoadModule deflate_module /usr/lib/httpd/modules/mod_deflate.so
</IfModule>
<IfModule pagespeed_module>
SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER
ModPagespeed on
From bb2a78858cffa7c6937642986e9aca1a4f862c0d Mon Sep 17 00:00:00 2001
From: Ilya Grigorik <[email protected]>
Date: Thu, 10 Jun 2010 00:46:48 -0400
Subject: [PATCH] async rails3
---
Gemfile | 6 ++++++
app/controllers/widgets_controller.rb | 6 ++++++
app/models/widget.rb | 2 ++
config.ru | 1 +

If one was inclined to use the acts_as_yaffle pattern, they would probably use the second one, rather than the heavily cargo-culted first one.

Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.0.beta3)
* actionpack (3.0.0.beta3)
* activemodel (3.0.0.beta3)
* activerecord (3.0.0.beta3)
* activeresource (3.0.0.beta3)
* activesupport (3.0.0.beta3)
* arel (0.3.3)
* builder (2.1.2)
diff -up ext/openssl/ossl.c.ossl10 ext/openssl/ossl.c
--- ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100
+++ ext/openssl/ossl.c 2009-08-26 12:29:41.000000000 +0200
@@ -92,7 +92,7 @@ ossl_x509_ary2sk(VALUE ary)
#define OSSL_IMPL_SK2ARY(name, type) \
VALUE \
-ossl_##name##_sk2ary(STACK *sk) \
+ossl_##name##_sk2ary(STACK_OF(type) *sk) \
{ \
RUBY_GC_MALLOC_LIMIT=60000000
RUBY_HEAP_MIN_SLOTS=500000
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
RUBY_HEAP_SLOTS_INCREMENT=1
# spec/helper/random_form_builder_spec.rb
describe RandomFormBuilder do
attr_reader :builder, :helper
before do
@helper = Object.extend(ActionView::Helpers::FormHelper)
@object = stub_model(Random)
@builder = RandomFormBuilder.new(:random, @object, @helper, {}, nil)
end
end
require 'fileutils'
$cache_dir = File.join('tmp', 'watchr')
FileUtils.mkdir_p($cache_dir) unless File.exist?($cache_dir)
def modified?(file)
cache_file = File.join $cache_dir, file
`diff #{file} #{cache_file} >/dev/null 2>&1`
if $? != 0
# application/moneyhats/app/models/order.rb
# pending - The initial order state. No successful or unsuccessful
# payments have been attempted on the order.
# authorized - A successful order authorization has been made. The
# order is ready for fulfillment and payment capture.
# paid - The authorized payment has been captured.
# payment_declined - Authorization has been attempted, but failed.
# The order can still be authorized in a subsequent
# authorization attempt.