start new:
tmux
start new with session name:
tmux new -s myname
| GEM | |
| remote: http://ruby.taobao.org/ | |
| specs: | |
| activemodel (3.2.14) | |
| activesupport (= 3.2.14) | |
| builder (~> 3.0.0) | |
| activesupport (3.2.14) | |
| i18n (~> 0.6, >= 0.6.4) | |
| multi_json (~> 1.0) | |
| backports (3.3.3) |
| source 'http://dotide.com' | |
| ruby '2.0.0' | |
| group :backend do | |
| gem 'rails', '4.0.0' | |
| gem 'grape' | |
| gem 'mongoid' | |
| gem 'redis' | |
| end |
| $('.feature-slides li').removeClass('hide'); | |
| // Make the actual CORS request. | |
| function makeCorsRequest() { | |
| // All HTML5 Rocks properties support CORS. | |
| var url = 'http://api.dotide.com:9292/v1/products'; | |
| var xhr = createCORSRequest('GET', url); | |
| if (!xhr) { | |
| alert('CORS not supported'); | |
| return; |
| n=50000; | |
| r=0.7;r_e=(1-r*r)^.5; | |
| X=rnorm(n); | |
| Y=X*r+r_e*rnorm(n); | |
| Y=ifelse(X>0,Y,-Y); | |
| plot(X,Y,col="pink",main="This picture represents my heart") | |
| n=50000; | |
| r=0.7;r_e=(1-r*r)^.5; | |
| X=rnorm(n); |
| find :path -type f -exec sed -e 's/ugly/beautiful/g' -i '' {} \; |
| # This will ride alongside god and kill any rogue memory-greedy | |
| # processes. Their sacrifice is for the greater good. | |
| unicorn_worker_memory_limit = 300_000 | |
| Thread.new do | |
| loop do | |
| begin | |
| # unicorn workers | |
| # |
| # http://unicorn.bogomips.org/SIGNALS.html | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| rails_root = ENV['RAILS_ROOT'] || "/data/github/current" | |
| God.watch do |w| | |
| w.name = "unicorn" | |
| w.interval = 30.seconds # default | |
| # unicorn needs to be run from the rails root |
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |
| rails_root = "/data/github/current" | |
| 20.times do |num| | |
| God.watch do |w| | |
| w.name = "dj-#{num}" | |
| w.group = 'dj' | |
| w.interval = 30.seconds | |
| w.start = "rake -f #{rails_root}/Rakefile production jobs:work" | |
| w.uid = 'git' |