NOTE: 534 stars, 106 forks. I love you all. Please contribute tips and edits back to this cheat sheet -- email's will.sargent@gmail.com and you can treat gists like git repositories and send git diffs.
| #!/bin/bash | |
| source /etc/environment | |
| name=$(cat /etc/machine-id) | |
| if [ ! -f /opt/consul ]; then | |
| mkdir /opt | |
| mkdir /var/lib/consul | |
| wget https://dl.bintray.com/mitchellh/consul/0.3.1_linux_amd64.zip | |
| unzip 0.3.1_linux_amd64.zip |
| # uber-hacky dynamic collection names for MongoID models: | |
| # | |
| # class MyModel | |
| # include Mongoid::PrefixableDocument # ...instead of Mongoid::Document | |
| # include Mongoid::Timestamps | |
| # | |
| # field :foobar, :type => Integer | |
| # | |
| # def my_method; 123; end | |
| # |
LD_PRELOAD=/usr/local/Cellar/jemalloc/3.6.0/lib/libjemalloc.dylib unicorn -c config/unicorn.rb -E production -p 3000
-
http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production
LD_PRELOAD=/home/sam/Source/jemalloc-3.5.0/lib/libjemalloc.so RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.9 ruby stress.rb
Welcome!
For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.
Starring this gist will give me an idea of how many people consider this list useful.
- Organize resources into sections
- More detailed sections (perhaps sections & subsections)
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets from https://github.com/skaes/rvm-patchsets
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.
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |
| # Rake task to launch multiple Resque workers in development/production with simple management included | |
| require 'resque/tasks' # Require Resque tasks | |
| namespace :workers do | |
| # = $ rake workers:start | |
| # | |
| # Launch multiple Resque workers with the Rails environment loaded, | |
| # so they have access to your models, etc. |