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
#!/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
[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]
#
# 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
@damm
damm / gist:186246
Created September 13, 2009 17:16 — forked from anonymous/gist:186245
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|
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
{
"default_interface": "br0",
"interfaces": {
"br0": {
"flags": [
"UP",
"BROADCAST",
"RUNNING",
"MULTICAST"
],
@damm
damm / blah
Created August 30, 2009 05:26
{
"default_interface": "en0",
"interfaces": {
"stf0": {
"number": "0",
"flags": [
],
"addresses": {
keys = []
search(:node, "*") do |server|
server['keys_ssh_host_rsa_public'].each do |x|
Chef::Log.debug("SSH RSA Key #{x}")
my_host_rsa_public << x
end
server['ipaddress'].each do |y|
Chef::Log.debug("IP Address #{y}")
my_host_ip << y
end
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
LogFormat "%V\t%{X-Forwarded-For}i\t%h\t%{%s}t\t%>s\t%b\t%D\t%X\t\"%r\"\t\"%{Referer}i\"\t\"%{User-Agent}i\"" common