Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
We couldn’t find that file to show.
@agoddard
agoddard / Cheffile out
Created August 16, 2011 04:27
Output of Cheffile with collectd @ github
[Librarian] Scheduling collectd (>= 0) <http://community.opscode.com/api/v1>
[Librarian] Scheduling collectd_plugins (>= 0) <http://community.opscode.com/api/v1>
[Librarian] Scheduling collectd (>= 0) <https://github.com/agoddard/collectd-cookbook#ae31704731f06b89def62ed1c1ce40892e95dcf9>
[Librarian] Scheduling collectd_plugins (>= 0) <http://community.opscode.com/api/v1>
[Librarian] Resolving collectd (>= 0) <http://community.opscode.com/api/v1>
[Librarian] Caching http://community.opscode.com/api/v1/cookbooks/collectd
[Librarian] Caching http://community.opscode.com/api/v1/cookbooks/collectd/versions/1_0_0
[Librarian] Checking collectd/1.0.0 <http://community.opscode.com/api/v1>
[Librarian] Resolving collectd_plugins (>= 0) <http://community.opscode.com/api/v1>
[Librarian] Caching http://community.opscode.com/api/v1/cookbooks/collectd_plugins
@agoddard
agoddard / dot_git_colors
Created August 22, 2011 04:40
dot_git_colors
#!/bin/bash
#
# Set our bash prompt according to the branch/status of the current git
# repository.
#
# Forked from http://gist.github.com/31934
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
@agoddard
agoddard / elasticsearch.yml
Created January 13, 2012 19:22
logstash indexer config
path.conf: /etc/elasticsearch
path.data: /var/db/elasticsearch
path.work: /tmp
path.logs: /var/log/elasticsearch
bootstrap.mlockall: true
@agoddard
agoddard / chef-dns.rb
Created February 1, 2012 00:18
populating DNS A records
hosts = search(:node, "*:*")
domains = {}
hosts.each do |node|
unless node.domain.nil?
domains[node.domain.to_sym] = [] if domains[node.domain.to_sym].nil?
domains[node.domain.to_sym] << {node.fqdn => node.ipaddress}
end
end
#
# Denali's No-Knead Miracle Bread
#
require 'cast_iron_dutch_oven' # sudo gem install dutch_oven --version 3.5 Quart --source KitchenwaresStore
require 'mixing_bowl'
require 'spatula'
desc "Step 1. To be performed at night"
task(:at_night) do
@agoddard
agoddard / gist:2472717
Created April 23, 2012 17:58
rabbitphail
==> /var/log/rabbitmq/rabbit.log <==
==> /var/log/rabbitmq/rabbit.log.1 <==
=INFO REPORT==== 23-Apr-2012::19:54:16 ===
Memory limit set to 400MB.
=INFO REPORT==== 23-Apr-2012::19:54:16 ===
Rolling persister log to "/var/lib/rabbitmq/mnesia/rabbit/rabbit_persister.LOG.previous"
@agoddard
agoddard / host_groups_to_knife.py
Created May 9, 2012 23:15
Converts Nagios hosts config to knife role from file commands.
#!/usr/bin/env python
def host_groups_to_knife(hosts_config, output_file="knife_commands.sh"):
"""Converts Nagios hosts config to knife role from file commands."""
file = open(hosts_config, 'r')
output = "#!/bin/bash\n"
for line in file:
@agoddard
agoddard / vagrantenv.rb
Created May 17, 2012 20:28
vagrant environment
Vagrant::Config.run do |config|
config.vm.provision :chef_client do |chef|
chef.environment = "staging"
end
end