This file contains 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
ruby_block "apache_version" do | |
block do | |
@apache_version_temp1=IO.popen("/usr/local/apache/bin/httpd -V | grep 'Server version' | awk '{print $3}' | cut -d / -f 2-2") | |
@apache_version=@apache_version_temp1.readline.chomp.to_i | |
end | |
end | |
remote_file "/usr/src/httpd-2.2.14.tar.bz2" do | |
source "http://archive.apache.org/dist/httpd/httpd-2.2.14.tar.bz2" | |
owner "root" |
This file contains 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
upstream unicorn { | |
server unix:/u/apps/something/shared/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name something.com; | |
access_log /u/apps/something/current/log/access.log main; | |
error_log /u/apps/something/current/log/error.log error; | |
This file contains 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
gemcount=`gem list --local something | wc -l` | |
if [ "${gemcount}" = "1" ] | |
then | |
echo "OK: it's installed" | |
exit 0 | |
else | |
echo "I am sorry but #{gemcount} != 1" | |
exit 1 | |
fi | |
else |
This file contains 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
## http://brainspl.at/nginx.conf.txt | |
#user and group to run as | |
user nginx nginx; | |
# number of nginx workers | |
worker_processes 4; | |
# pid of nginx master process | |
# pid /var/run/nginx.pid |
This file contains 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
location / { | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_buffers 16 8k; | |
proxy_redirect off; |
This file contains 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
location / { | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_buffers 16 8k; | |
proxy_redirect off; |
This file contains 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
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_max_temp_file_size 0; | |
if (-f $request_filename/index.html) { | |
rewrite (.*) $1/index.html break; | |
} |
This file contains 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
cd /usr/src;wget "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.bz2"&& tar jxfv ruby-1.8.7-p174.tar.bz2 | |
cd ruby-1.8.7-p174 | |
./configure --prefix=/usr --enable-shared --enable-pthread | |
make | |
make install | |
cd /root | |
cd /tmp | |
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz | |
tar zxf rubygems-1.3.4.tgz | |
cd rubygems-1.3.4 |
This file contains 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
#!/bin/sh | |
# Copyright: Nobody | |
# Author: Noone | |
# Year: ? | |
# License: Free | |
start() { | |
chef-client -i 1800 --splay 60 & | |
} |
This file contains 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
if Gem.const_get "RubyGemsVersion" < "1.3.5" | |
%w{ | |
rubygems | |
rubygems-doc | |
rubygems1.8 | |
rubygems1.9 | |
}.each do |p| | |
apt_package(p) { action :purge } | |
end | |