This file contains hidden or 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
# | |
# Cookbook Name:: nagios | |
# Recipe:: repo | |
# | |
# Copyright 2011, sawanoboly | |
# | |
package "python-software-properties" do | |
#version "" | |
action :install |
This file contains hidden or 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 | |
daemon | |
user haproxy | |
group haproxy | |
log /dev/log daemon info | |
maxconn 4096 | |
defaults | |
log global | |
option dontlognull |
This file contains hidden or 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
prompt = function() { | |
// set version | |
version = db.version(); | |
// case mongos | |
if (rs.status().info == 'mongos') { | |
return rs.status().info + ':[' + version + '] > '; | |
} | |
// config or replica |
This file contains hidden or 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
if [ -z "$TMUX" ]; then | |
if [ "$TERM" != screen ]; then | |
# echo check | |
eval `ssh-agent -s` | |
fi | |
fi |
This file contains hidden or 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
# god respawn | |
description "god" | |
# start on filesystem | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
expect fork |
This file contains hidden or 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
# http://god.rubyforge.org/ | |
# http://unicorn.bogomips.org/SIGNALS.html | |
# http://railscasts.com/episodes/130-monitoring-with-god | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
rails_appname = ENV['RAILS_APPNAME'] || 'appname' | |
rails_root = ENV['RAILS_ROOT'] || "/opt/deploy/#{rails_appname}/current" | |
num_workers = rails_env == 'production' ? 8 : 1 | |
thin_rootport = 3000 |
This file contains hidden or 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
## WordPress Setup script for Joyent SmartMachine 1.4.7 | |
## How to use. | |
## run auto setup. | |
# wget https://gist.github.com/gists/1311791/download --no-check-certificate -O - | gzip -d | bash | |
# Open http://{server address} | |
# 1.install mysql-server and apache,mod_php. | |
# 2.Download wordpress from svn repository. | |
# 3.create wp_config.php |
This file contains hidden or 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
# http://god.rubyforge.org/ | |
# http://unicorn.bogomips.org/SIGNALS.html | |
# http://railscasts.com/episodes/130-monitoring-with-god | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
rails_appname = ENV['RAILS_APPNAME'] || 'myapp' | |
rails_root = ENV['RAILS_ROOT'] || "/opt/deploy/#{rails_appname}/current" | |
def generic_monitoring(w, options = {}) | |
# generic_monitoring option list |
This file contains hidden or 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/env ruby | |
## Wordpress test tool. | |
## Create new post. | |
## | |
## Reference: http://rcbth.com/2010/07/16/wordpress-posting-from-ruby-xmlrpc/ | |
require 'xmlrpc/client' | |
# Wordpress Setting |
This file contains hidden or 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
## WordPress Setup script for Joyent SmartMachine 1.3.6 | |
## How to use. | |
# wget https://raw.github.com/gist/1274859/8508adf89853cfd9899648d3a867bfb5b81e0fe8/wp.sh --no-check-certificate -O - | bash | |
# Open http://{server address} | |
# 1.install mysql-server and apache,mod_php. | |
# 2.Download wordpress from svn repository. | |
# 3.create wp_config.php |