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
$ sudo echo deb-src http://archive.ubuntu.com/ubuntu natty main universe>> /etc/apt/sources.list | |
$ sudo apt-get -y update | |
$ sudo apt-get -y install git | |
$ sudo apt-get -y build-dep ruby1.9.1-full | |
$ sudo apt-get -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev | |
$ sudo -s | |
# bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
## use older version rvm. |
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
## lxc-tool for natty | |
## copy sshdconfigs from host to all guests. (ignore the guest status) | |
## author [email protected] | |
## Usage: rake copyssh | |
require 'pp' | |
LXC_DIR = "/var/lib/lxc/" | |
rake_env = ENV['RAKE_ENV'] || "dafault" |
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
## lxc-tool for natty | |
## Create inet_interface for lxc containers. (ignore the guest status) | |
## author [email protected] | |
## Usage: rake conf_ip RAKE_ENV=environment (default=default) | |
require 'pp' | |
require 'erb' | |
LXC_DIR = "/var/lib/lxc/" | |
rake_env = ENV['RAKE_ENV'] || "dafault" |
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
## 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 |
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/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 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 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 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 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 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 |
OlderNewer