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
# I recently switched one of my Rails applications from Litespeed to Apache+Passenger | |
# with nginx on the frontend to handle static file requests. nginx proxies all non-static | |
# file requests to Apache+Passenger. I use page caching extensively, so that is why I | |
# need fast static file serving. | |
# | |
# I ran some quick tests comparing static file serving of Litespeed, Apache, and nginx. | |
# Here are the results: | |
# | |
# nginx 4400 requests/second | |
# Apache 2900 requests/second |
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
#!/bin/bash -e | |
if test "$RS_REBOOT" = "true" ; then | |
echo "Skip HTTPD install on reboot." | |
logger -t RightScale "Skip nginx install on reboot." | |
service nginx start | |
exit 0 # Leave with a smile ... | |
fi | |
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: ian <ian@rightscale.com> | |
Date: Tue Sep 15 17:12:05 2009 -0500 | |
refs #4568 - a deployment can have ST that do not belong to the account. do not be so restrictive on the STE (server template executabl | |
diff --git a/app/controllers/deployments_controller.rb b/app/controllers/deployments_controller.rb | |
index 09cd380..7a9a565 100644 | |
--- a/app/controllers/deployments_controller.rb | |
+++ b/app/controllers/deployments_controller.rb | |
@@ -435,7 +435,7 @@ class DeploymentsController < ApplicationController |
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 | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
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
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
95b1e56 HEAD@{2}: checkout: moving from 57bc4b4b0e698f808df979ceaec922777196aa03 to master | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
95b1e56 HEAD@{2}: checkout: moving from 57bc4b4b0e698f808df979ceaec922777196aa03 to master | |
57bc4b4 HEAD@{3}: checkout: moving from input_refactor_4664 to 57bc4b4b0e698f808df979ceaec922777196aa03 |
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
[client] | |
socket=/tmp/mysql.sock | |
[mysqld] | |
socket=/tmp/mysql.sock | |
datadir=/Users/ian/Apps/mysql5 |
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
<ReplicationFactor>2</ReplicationFactor> | |
<ListenAddress>127.0.0.1</ListenAddress> | |
<CommitLogDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/commitlog</CommitLogDirectory> | |
<DataFileDirectories> | |
<DataFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/data</DataFileDirectory> | |
</DataFileDirectories> | |
<CalloutLocation>/path/to/cassandra/bin/var.1/lib/cassandra/callouts</CalloutLocation> | |
<StagingFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/staging</StagingFileDirectory> | |
<ThriftAddress>127.0.0.1</ThriftAddress> |
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
<ReplicationFactor>2</ReplicationFactor> | |
<ListenAddress>127.0.0.1</ListenAddress> | |
<CommitLogDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/commitlog</CommitLogDirectory> | |
<DataFileDirectories> | |
<DataFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/data</DataFileDirectory> | |
</DataFileDirectories> | |
<CalloutLocation>/path/to/cassandra/bin/var.1/lib/cassandra/callouts</CalloutLocation> | |
<StagingFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/staging</StagingFileDirectory> | |
<ThriftAddress>127.0.0.1</ThriftAddress> |
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
class Base | |
end | |
class A < Base | |
end | |
class Base | |
class << self | |
attr_accessor :bar | |
end |
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 'mongo_mapper' | |
MongoMapper.connection = Mongo::Connection.new('localhost') | |
MongoMapper.database = 'books' | |
class Book | |
include MongoMapper::Document | |
CONTEXTS = ['authors', 'rating','keywords', 'genre'] | |
CONTEXTS.each do |context| |
OlderNewer