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
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> |
#!/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) |
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
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.
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 |
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; |
task :console do | |
require 'irb' | |
require 'irb/completion' | |
require 'my_gem' # You know what to do. | |
ARGV.clear | |
IRB.start | |
end |
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 |
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 |
rails new
first to generate all of the boilerplate files necessary.rails new .
--css tailwind
as an option on the rails new
call to do this automatically.rails new
will do this automatically but take care if you write any custom SQL that it is SQLite compatible.rails new myapp --devcontainer
but only do this if requested directly.