Skip to content

Instantly share code, notes, and snippets.

View edavis10's full-sized avatar

Eric Davis edavis10

View GitHub Profile
check process projects_littlestreamsoftware_mongrel_12000
with pidfile /home/websites/projects.littlestreamsoftware.com/shared/pids/mongrel.12000.pid
start program = "/usr/bin/mongrel_rails cluster::start -C /home/websites/projects.littlestreamsoftware.com/current/config/mongrel_cluster.yml --clean --only 12000"
stop program = "/usr/bin/mongrel_rails cluster::stop -C /home/websites/projects.littlestreamsoftware.com/current/config/mongrel_cluster.yml --only 12000"
if totalmem is greater than 90.0 MB for 4 cycles then restart
if cpu is greater than 80% for 4 cycles then restart
if 20 restarts within 20 cycles then timeout
group redmine
check process projects_littlestreamsoftware_mongrel_12001
PerlLoadModule Apache::Authn::Redmine
<Location /svn>
DAV svn
SVNParentPath "/tmp/var/svn"
AuthType Basic
AuthName redmine
Require valid-user
PerlAccessHandler Apache::Authn::Redmine::access_handler
@edavis10
edavis10 / gist:13684
Created September 29, 2008 21:51 — forked from entp/gist:13681
<!-- for some reason this isn't receiving my style! -->
<pre class="tl-body viewsource"><%= foo.bar %></pre>
<VirtualHost *:80>
ServerName example.com
ServerAdmin webmaster@localhost
RewriteEngine On
DocumentRoot /home/websites/example.com/current/public
<Directory "/home/websites/example.com/current/public">
Options FollowSymLinks
AllowOverride All
Order allow,deny
## Test Run
$ rake
(in /home/edavis/dev/redmine/redmine-core)
/usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/unit/enumeration_test.rb" "test/unit/attachment_test.rb" "test/unit/query_test.rb" "test/unit/message_test.rb" "test/unit/custom_field_test.rb" "test/unit/wiki_test.rb" "test/unit/user_test.rb" "test/unit/document_test.rb" "test/unit/role_test.rb" "test/unit/custom_value_test.rb" "test/unit/search_test.rb" "test/unit/wiki_redirect_test.rb" "test/unit/issue_category_test.rb" "test/unit/repository_bazaar_test.rb" "test/unit/token_test.rb" "test/unit/time_entry_test.rb" "test/unit/subversion_adapter_test.rb" "test/unit/calendar_test.rb" "test/unit/helpers/application_helper_test.rb" "test/unit/repository_git_test.rb" "test/unit/mercurial_adapter_test.rb" "test/unit/watcher_test.rb" "test/unit/project_test.rb" "test/unit/changeset_test.rb" "test/unit/journal_test.rb" "test/unit/tracker_test.rb" "test/unit/wiki_page_test.rb" "test/unit/issue_test
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base
#!/usr/bin/env ruby
# Written by Coda Hale <[email protected]>. MIT License. Go for it.
def include_pattern(filename)
core = filename.gsub(/_spec/, "").gsub(/\Aspec\//, "")
return Regexp.quote(core)
end
if ARGV.empty? || ARGV == ["--help"] || ARGV == ["-h"]
STDERR.puts("Usage:")
### Modified
ActionController::Routing::Routes.draw do |map|
# Add your own custom routes here.
# The priority is based upon order of creation: first created -> highest priority.
# Here's a sample route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# My jQuery thinking is starting to bleed into Ruby
def amount_for_user(user=nil)
return 0 if self.time_entries.size <= 0
return self.time_entries.select do |time_entry|
user.nil? || time_entry.user == user
end.collect(&:cost).compact.sum
end
@edavis10
edavis10 / rate_users_helper_patch.rb
Created January 28, 2009 18:15
Adds a new tab to Redmine's User Administration page
require_dependency 'users_helper'
module RateUsersHelperPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
base.class_eval do
alias_method_chain :user_settings_tabs, :rate_tab
end
end