This file contains hidden or 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 --git a/gc.c b/gc.c | |
--- a/gc.c | |
+++ b/gc.c | |
@@ -77,6 +77,41 @@ void *alloca (); | |
#ifndef GC_MALLOC_LIMIT | |
#define GC_MALLOC_LIMIT 8000000 | |
#endif | |
+#define HEAP_MIN_SLOTS 10000 | |
+#define FREE_MIN 4096 | |
+ |
This file contains hidden or 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 'handlebars' | |
module HBSTemplateHandler | |
def self.call(template) | |
if template.locals.include? :hbs | |
<<-TEMPLATE | |
template = Handlebars.compile #{template.source.inspect} | |
template.call(hbs || {}).html_safe | |
TEMPLATE | |
else |
This file contains hidden or 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' | |
require 'eventmachine' | |
require 'em-http-request' | |
require 'fiber' | |
EventMachine.run do | |
http = EM::HttpRequest.new('http://www.google.com').get | |
begin | |
puts "Before" | |
http.callback { |
This file contains hidden or 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
bash -c ' | |
if [ ! -f /usr/bin/chef-client ]; then | |
apt-get update | |
apt-get install -y build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev autoconf libc6-dev | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
( | |
cat <<'EOP' | |
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" # This loads RVM into a shell session. | |
EOP |
This file contains hidden or 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 MailchimpDeliveryMethod | |
attr_accessor :settings | |
def initialize(values = {}) | |
self.settings = {:track_opens => true, | |
:track_clicks => true | |
}.merge!(values) | |
end | |
def deliver!(mail) |
This file contains hidden or 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
## | |
# CarrierWave Amazon S3 File Reprocessor Rake Task | |
# | |
# Written (specifically) for: | |
# - CarrierWave | |
# - Ruby on Rails 3 | |
# - Amazon S3 | |
# | |
# Works with: | |
# - Any server of which you have write-permissions in the Rails.root/tmp directory |
NewerOlder