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.
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
RUBY_GC_MALLOC_LIMIT=60000000 | |
RUBY_HEAP_MIN_SLOTS=500000 | |
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
RUBY_HEAP_SLOTS_INCREMENT=1 |
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
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) \ | |
{ \ |
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
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) |
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
From bb2a78858cffa7c6937642986e9aca1a4f862c0d Mon Sep 17 00:00:00 2001 | |
From: Ilya Grigorik <ilya@igvita.com> | |
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 + |
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
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 |
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 A | |
def method_missing(m, *args) | |
n = m.to_s.split('_')[1].to_i | |
send "print_#{n-1}" | |
puts n | |
end | |
def print_1 | |
puts 1 | |
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
# RFC2616 10.3.3 | |
# If the 302 status code is received in response to a request other | |
# than GET or HEAD, the user agent MUST NOT automatically redirect the | |
# request unless it can be confirmed by the user, since this might | |
# change the conditions under which the request was issued. | |
# Note: RFC 1945 and RFC 2068 specify that the client is not allowed | |
# to change the method on the redirected request. However, most | |
# existing user agent implementations treat 302 as if it were a 303 | |
# response, performing a GET on the Location field-value regardless |
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
#!/usr/bin/python2 | |
USAGESTR = """Usage: fetchsub.py [-l langcode] videofile1 [videofile2 ...] | |
langcode: chn [default] | |
eng | |
sub file will saved in the same directory of each videofile | |
XXXXXXX.mkv 's sub files will named as: | |
XXXXXXX.chn.0.srt, XXXXXXX.chn.1.srt, XXXXXXX.chn.2.srt | |
""" | |
"""Author: sevenever |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Analog Clock</title> | |
<script> | |
function updateTime() { // Update the SVG clock | |
var now = new Date(); | |
var sec = now.getSeconds(); | |
var min = now.getMinutes(); | |
var hour = (now.getHours() % 12) + min/60; |