Skip to content

Instantly share code, notes, and snippets.

View damm's full-sized avatar

Scott M. Likens damm

  • Seattle, Washington USA
View GitHub Profile
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;
## 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
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
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;
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"
@damm
damm / default.rb
Created October 16, 2009 20:15 — forked from adamhjk/default.rb
#
# Cookbook Name:: users
# Recipe:: default
#
# Copyright 2009, Opscode, Inc
package "libshadow-ruby1.8"
group "sysadmin" do
gid 4242
remote_file "/usr/src/nagios-3.2.0.tar.gz" do
source "http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz"
checksum "7cbf35ba0319f24fa085982c038437c4515003b27863c4897dc86b197a50a5e7"
not_if { FileTest.exists?("/usr/src/nagios-3.2.0.tar.gz") }
end
execute "un-unarchive nagios" do
command "cd /usr/src;tar zxfv nagios-3.2.0.tar.gz"
only_if { FileTest.exists?("/usr/src/nagios-3.2.0.tar.gz") }
not_if { FileTest.directory?("/usr/src/nagios-3.2.0") }
@damm
damm / .zshrc
Created October 22, 2009 05:34
# Joshua Timberman <joshua@housepub.org>
# My .zshrc, modified from:
#
# $Id: .zshrc,v 1.1 2006/04/19 22:08:04 adam Exp $
#
# Adam's zshrc - <adam@stalecoffee.org>
#
# Stolen entirely from --
#
# Andy's zshrc <william.a@carrel.org>
#
# Cookbook Name:: scaffold
# Recipe:: network
#
# Copyright 2009, IGN Entertainment
#
# All rights reserved - Do Not Redistribute
#
execute "set_hostname" do
@damm
damm / .zshrc
Created October 24, 2009 23:16
# Joshua Timberman <joshua@housepub.org>
# My .zshrc, modified from:
#
# $Id: .zshrc,v 1.1 2006/04/19 22:08:04 adam Exp $
#
# Adam's zshrc - <adam@stalecoffee.org>
#
# Stolen entirely from --
#
# Andy's zshrc <william.a@carrel.org>