If you're unfamiliar or looking to get more familiar with Ruby & Rails, then checkout this tutorial and this learning site.
Installing Homebrew will make it much easier to install the necessary libraries.
require "net/http" | |
def start_server | |
# Remove the X to enable the parameters for tuning. | |
# These are the default values as of Ruby 2.2.0. | |
@child = spawn(<<-EOC.split.join(" ")) | |
XRUBY_GC_HEAP_FREE_SLOTS=4096 | |
XRUBY_GC_HEAP_INIT_SLOTS=10000 | |
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8 | |
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0 |
1) Install Varnish first | |
https://gist.github.com/nghuuphuoc/7819928 | |
2) Install Nexcessnet_Turpentine | |
$ cd <Magento directory> | |
$ chmod 755 mage | |
$ ./mage install connect20.magentocommerce.com/community Nexcessnet_Turpentine | |
Checking dependencies of packages | |
Starting to download Nexcessnet_Turpentine-0.6.0.tgz ... | |
...done: 59,467 bytes |
task :console do | |
require 'irb' | |
require 'irb/completion' | |
require 'my_gem' # You know what to do. | |
ARGV.clear | |
IRB.start | |
end |
select.form-control + .chosen-container.chosen-container-single .chosen-single { | |
display: block; | |
width: 100%; | |
height: 34px; | |
padding: 6px 12px; | |
font-size: 14px; | |
line-height: 1.428571429; | |
color: #555; | |
vertical-align: middle; | |
background-color: #fff; |
preload_app! | |
min_threads = Integer(ENV['MIN_THREADS'] || 0) | |
max_threads = Integer(ENV['MAX_THREADS'] || 5) | |
threads min_threads, max_threads | |
workers Integer(ENV['WORKER_COUNT'] || 3 ) | |
on_worker_boot do | |
ActiveSupport.on_load(:active_record) do |
If you're unfamiliar or looking to get more familiar with Ruby & Rails, then checkout this tutorial and this learning site.
Installing Homebrew will make it much easier to install the necessary libraries.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/env bash | |
# | |
# Homebrew & Ruby setup for OSX | |
# | |
set -e | |
# Setup some array's | |
declare -a brew_libs=(apple-gcc42 openssl readline zlib libxml2 libyaml librsvg libiconv git curl solr wget redis sqlite memcached ack phantomjs mysql node) | |
declare -a rbenv_plugins=(ruby-build rbenv-vars rbenv-default-gems rbenv-gem-rehash) |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
# Yockeries - Yaml + Mocks + Factories(easy way to create them) | |
# | |
# Long ago there was an uprising against YAML fixtures in the rails world. Some | |
# people replaced them with things like FactoryGirl, Machinist, Fabrication, and a | |
# bunch of others. | |
# | |
# However, YAML is still the simpliest thing that works, because it comes with | |
# Ruby. When you load in a yaml file with YAML.load_file, the yaml data is | |
# converted into a hash, which again is simple to use and test. You can take | |
# that hash and create a new object with it: Person.new(yaml_converted_hash), |