Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am samgranieri on github.
  • I am samgranieri (https://keybase.io/samgranieri) on keybase.
  • I have a public key ASCa5zG_Ii2qmyTauM5CLNAYvtjl0DPxa3wqIyGopcv9lAo

To claim this, I am signing this object:

@samgranieri
samgranieri / gist:a8c72be43272563e3d24
Last active July 1, 2016 13:21
How to install gems that need openssl with rbenv on osx el capitan with ruby 2.3.0
PKG_CONFIG_PATH=/usr/local/Cellar/openssl/1.0.2h_1/lib/pkgconfig gem install eventmachine
❯❯❯ brew config ⏎ ✱ (git:mergetastic_plus_sam)
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 9a4b0ebd9fb803b6936a51813e397c75296002f1
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.10-x86_64
Xcode: 6.1
@samgranieri
samgranieri / 0-readme.md
Last active December 12, 2015 12:29 — forked from burke/0-readme.md

ruby-1.9.3-p385 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@samgranieri
samgranieri / 0-readme.md
Created November 14, 2012 22:42 — forked from lucassus/0-readme.md
ruby-1.9.3-p286 cumulative performance patch.

Patched ruby 1.9.3-p286 for 30% faster rails boot + with support of utf-8 console input

What is?

This script installs a patched version of ruby 1.9.3-p286 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@samgranieri
samgranieri / 0-readme.md
Created August 13, 2012 15:39 — forked from burke/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p194 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@samgranieri
samgranieri / compiled.sh
Created July 19, 2012 16:38
this is what the last one compiles to
check process resque_pool
with pidfile /var/www/app/shared/pids/resque_pool.pid
start program = "/usr/bin/env PATH=/usr/local/bin:$PATH rvm_path=/home/rails/.rvm /home/rails/.rvm/bin/rvm-shell -c 'cd /var/www/app/current && bundle exec resque-pool -E qa -p /var/www/app/shared/pids/resque_pool.pid -o /var/www/app/shared/log/resque_pool.log -e /var/www/app/shared/log/resque_pool.log -d'" as uid rails and gid rails with timeout 90 seconds
stop program = "/usr/bin/env PATH=/usr/local/bin:$PATH rvm_path=/home/rails/.rvm /home/rails/.rvm/bin/rvm-shell -c 'cd /var/www/app/current && cat /var/www/app/shared/pids/resque_pool.pid | xargs kill -QUIT && rm -f /var/www/app/shared/pids/resque_pool.pid; exit 0;'" as uid rails and gid rails with timeout 90 seconds
if totalmem is greater than 450 MB for 10 cycles then restart
group resque
@samgranieri
samgranieri / resque_pool.erb
Created July 19, 2012 16:29
resque pool and the limited path it generates
/var/www/app_name/shared/bundle/ruby/1.9.1/bin
/home/rails/.rvm/gems/ruby-1.9.3-p194@app_name/bin
/home/rails/.rvm/gems/ruby-1.9.3-p194@global/bin
/home/rails/.rvm/rubies/ruby-1.9.3-p194/bin
/home/rails/.rvm/bin
/bin
/usr/bin
/sbin
/usr/sbin
server {
listen 80;
server_name www.derp.com;
location /Default.aspx{
return 301 http://www.derp.com;
}
}
# Add this to the bottom of config/initializers/active_admin.rb
module ActiveAdmin
class Comment < ActiveRecord::Base
attr_accessible :body, :namespace, :resource_id, :resource_type
end
end