Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott M. Likens damm

  • Seattle, Washington USA
View GitHub Profile
View gist:182065
execve("/bin/df", ["df", "/boot"], [/* 23 vars */]) = 0
brk(0) = 0x9f76000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=57458, ...}) = 0
mmap2(NULL, 57458, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fd0000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320_1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1606808, ...}) = 0
View gist:186246
ruby_block "something" do
block do
require 'expect'
require 'pty'
PTY.spawn( 'dnscache-setup' ) do |read,write,pid|
write.sync = true
$expect_verbose = false
read.expect( '(press enter to begin setup, or press control-C to abort)', 30 ) do |response|
View src_nginx.rb
#
# Cookbook Name:: nginx
# Recipe:: src
# Author:: Scott M. Likens <scott@likens.us>
%w(build-essential libxslt1-dev libxml2-dev libpcre3-dev libperl-dev libssl-dev).each do |p|
package(p)
end
bash "install_nginx" do
View gist:186972
[Mon, 14 Sep 2009 18:15:03 -0400] INFO: Creating remote_file[/usr/src/memcached-1.4.1.tar.gz] at /usr/src/memcached-1.4.1.tar.gz
[Mon, 14 Sep 2009 18:15:03 -0400] INFO: Setting owner to 0 for remote_file[/usr/src/memcached-1.4.1.tar.gz]
[Mon, 14 Sep 2009 18:15:03 -0400] INFO: Setting group to 0 for remote_file[/usr/src/memcached-1.4.1.tar.gz]
[Mon, 14 Sep 2009 18:15:03 -0400] INFO: Setting mode to 644 for remote_file[/usr/src/memcached-1.4.1.tar.gz]
[Mon, 14 Sep 2009 18:15:03 -0400] INFO: Ran execute[unarchive-memcached] successfully
[Mon, 14 Sep 2009 18:15:08 -0400] INFO: Ran execute[configure-memcached] successfully
[Mon, 14 Sep 2009 18:15:10 -0400] INFO: Ran execute[make-memcached] successfully
[Mon, 14 Sep 2009 18:15:10 -0400] INFO: Ran execute[install-memcached] successfully
[Mon, 14 Sep 2009 18:15:10 -0400] INFO: Creating remote_file[/etc/init.d/memcached] at /etc/init.d/memcached
[Mon, 14 Sep 2009 18:15:10 -0400] INFO: Setting owner to 0 for remote_file[/etc/init.d/memcached]
View postgresql-8.4
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.4,v 1.1 2009/09/09 21:41:25 patrick Exp $
opts="${opts} reload"
depend() {
use net
if [ -L /etc/eselect/postgresql/service ] ; then
View test.rb
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
View mysql.sh
#!/bin/sh
# Copyright: Nobody
# Author: Noone
# Year: ?
# License: Free
start() {
chef-client -i 1800 --splay 60 &
}
View gist:197061
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
View gist:204340
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;
}
View gist:204375
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;