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
require 'rubygems' | |
require 'rest_client' | |
urls = ["http://localhost:5984/"] | |
databases = ["testdb1"] | |
count = 10 | |
inital_value = "test" | |
field_name = "test" |
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
global | |
log localhost local1 | |
maxconn 10000 | |
ulimit-n 65536 | |
nbproc 2 | |
user haproxy | |
group haproxy | |
stats socket /var/run/haproxy.socket | |
defaults |
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
# | |
# Author:: Joe Williams (<[email protected]>) | |
# Copyright:: Copyright (c) 2009 Joe Williams | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
(* | |
to compile: | |
$ ocamlfind ocamlopt -o print_http_json print_http_json.ml -linkpkg -package json-static,netclient -syntax camlp4o | |
to run (trying it out on couchdb): | |
$ ./print_http_json http://localhost:5984/joetest | |
*) |
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
# a script to perform httperf tests on couchdb | |
# requires the gems below as well as httperf | |
# some of the code was taken from http://github.com/sv/httperf4r | |
# set "ulimit -n 65535" | |
# change FD_SET_SIZE to 65535 in /usr/include/bits/typesizes.h before compiling httperf | |
require 'rubygems' | |
require 'rest_client' | |
require 'json' |
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
require 'mixlib/log' | |
class Deckard | |
class Log | |
extend Mixlib::Log | |
log_file = Deckard::Config.log_file | |
if log_file | |
Deckard::Log.init(log_file) |
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
joes-mac-mini:dbcore joe$ ./bin/couchdb | |
sh: line 0: exec: crypto_drv: not found | |
=INFO REPORT==== 11-Nov-2009::09:44:37 === | |
application: crypto | |
exited: {shutdown,{crypto_app,start,[normal,[]]}} | |
type: temporary | |
=INFO REPORT==== 11-Nov-2009::09:44:37 === | |
application: couch |
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
require 'rubygems' | |
require 'rest_client' | |
require 'json' | |
require 'net/ssh' | |
servers_json = RestClient.get("http://localhost:5984/chef/_design/nodes/_view/ec2_hostnames") | |
servers = JSON.parse(servers_json) | |
servers["rows"].each do |row| | |
Net::SSH.start( |
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
dir = "." | |
search = "someterm" | |
replace = "replace term" | |
extension = ".cfg" | |
files = Dir.new(dir).entries | |
files.delete(".") | |
files.delete("..") |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'rest_client' | |
require 'yajl' | |
def run_ops(notifications) | |
url = "http://user:*****@somehost:5984" | |
auth_doc = '{"someuser":["_reader","_writer","_admin"],"someuser1":["_reader","_writer","_admin"]}' | |