This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acl url_checkout path_beg /checkout | |
use_backend app_master if url_checkout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: resque | |
# Recipe:: default | |
# We don't want this to be setup on the master app/db slice | |
if ['solo', 'util'].include?(node[:instance_role]) | |
execute "install resque gem" do | |
command "gem install resque redis redis-namespace yajl-ruby -r" | |
not_if { "gem list | grep resque" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process nrsysmond | |
with pidfile /tmp/nrsysmond.pid | |
start program = "/etc/init.d/newrelic-sysmond start" | |
stop program = "/etc/init.d/newrelic-sysmond stop" | |
group newrelic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app_name = 'Networker' | |
service "nginx" do | |
supports :reload => true | |
action :enable | |
end | |
if ['solo', 'app', 'app_master'].include?(node[:instance_role]) | |
remote_file "/etc/nginx/servers/#{app_name}/custom.conf" do | |
source "custom.conf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swapfile = '/mnt/swapfile' | |
execute "create swapfile" do | |
command %Q{ dd if=/dev/zero of=#{swapfile} bs=1M count=1024 && \ | |
sudo mkswap #{swapfile} && \ | |
sudo swapon #{swapfile} } | |
not_if { File.exists? swapfile } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for PID in $(cat output.txt | grep PID | awk '{print $3}'); do | |
URL=$(cat output.txt| grep $PID -A 1 | tail -n 1| awk '{print $3}') | |
PASSWD=$(cat output.txt|grep $PID -A 2 | tail -n 1|awk '{print $2}') | |
echo "$PID $URL $PASSWD" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: resque | |
# Recipe:: default | |
# We don't want this to be setup on the master app/db slice | |
if ['solo', 'util'].include?(node[:instance_role]) | |
execute "install resque gem" do | |
command "gem install resque redis redis-namespace yajl-ruby -r" | |
not_if { "gem list | grep resque" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⚡ irb | |
1.9.3p125 :001 > ['adam', 'jim', 'tim'].sample | |
=> "tim" | |
1.9.3p125 :002 > ['adam', 'jim', 'tim'].sample | |
=> "tim" | |
1.9.3p125 :003 > ['adam', 'jim', 'tim'].sample | |
=> "jim" | |
1.9.3p125 :004 > ['adam', 'jim', 'tim'].sample | |
=> "jim" | |
1.9.3p125 :005 > ['adam', 'jim', 'tim'].sample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tim@MacBookPro15 /Users/Tim (ruby-1.8.7-p357) | |
⚡ rvm get head | |
Original installed RVM version: | |
rvm 1.10.2-pre by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.beginrescueend.com/] | |
remote: Counting objects: 44, done. | |
remote: Compressing objects: 100% (14/14), done. | |
remote: Total 30 (delta 20), reused 24 (delta 14) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tim@MacBookPro15 /Users/Tim (ruby-1.8.7-p357) | |
⚡ rvm list | |
rvm rubies | |
rbx-head [ x86_64 ] | |
=* ruby-1.8.7-p357 [ i686 ] | |
ruby-1.9.2-p290 [ x86_64 ] | |
ruby-1.9.3-p0 [ x86_64 ] | |
ruby-1.9.3-rc1 [ x86_64 ] |