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
| # # your config.ru | |
| # require 'unicorn_killer' | |
| # use UnicornKiller::MaxRequests, 1000 | |
| # use UnicornKiller::Oom, 400 * 1024 | |
| module UnicornKiller | |
| module Kill | |
| def quit | |
| sec = (Time.now - @process_start).to_i | |
| warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\talive: #{sec} sec" |
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
| # WAIT! Do consider that `wait` may not be needed. This article describes | |
| # that reasoning. Please read it and make informed decisions. | |
| # https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
| # Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
| describe 'Modal' do | |
| should 'display login errors' do | |
| visit root_path |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'xmpp4r' | |
| require 'xmpp4r/muc/helper/simplemucclient' | |
| # Most of this is borrowed from https://gist.github.com/941931 | |
| # Added support for multiple rooms and external handling of messages. | |
| # We want the MUC functionality to just handle shit for us. Unfortunately we | |
| # have to override/repeat the join method in order to add the directive that |
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
| --- a/thread.c | |
| +++ b/thread.c | |
| @@ -391,12 +391,21 @@ thread_cleanup_func_before_exec(void th_ptr) | |
| } | |
| static void | |
| -thread_cleanup_func(void th_ptr) | |
| +thread_cleanup_func(void *th_ptr, int atfork) | |
| { | |
| rb_thread_t *th = th_ptr; |
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 |
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
| ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux] | |
| curb (0.6.2.1) | |
| em-http-request (0.2.5) | |
| eventmachine (0.12.10) | |
| typhoeus (0.1.13) | |
| user system total real Memory (Kb) | |
| 4kb std | |
| 0.000000 0.000000 3.010000 ( 22.408594) 24,484 |
NewerOlder