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
# install passenger (I like this but others will choose mongrel clusters) | |
## Temporarily disable SELinux | |
echo 0 > /selinux/enforce | |
## Permantly disable by changing SELINUX=enforcing to SELINUX=disabled | |
## in the file: /etc/selinux/config use the command: | |
vi /etc/selinux/config | |
## Fix SELINUX (from passenger site) if installed from a gem (like here) | |
## find the passenger root folder: |
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
$ ruby -v | |
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] | |
$ gem list | |
*** LOCAL GEMS *** | |
actionmailer (2.3.4, 2.2.3) | |
actionpack (2.3.4, 2.2.3) | |
activerecord (2.3.4, 2.2.3) |
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
# Send all mail to a single address in staging | |
if RAILS_ENV == 'staging' | |
STAGING_EMAIL_ADDRESS = '[email protected]' | |
module TMail | |
class Mail | |
def destinations | |
[STAGING_EMAIL_ADDRESS] | |
end | |
def to=( *strs ) |
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
1. Create a text backup of your data form the live server. This will ask for a password. | |
mysqldump -u your_user -p your_redmine_database > backup_sql_file.sql | |
2. Transfer the backup_sql_file.sql to your new server. | |
3. Once there, drop the existing database on the new server. | |
!!!! Triple check this is on the new server and not your live one!!!! |
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
git diff | |
diff --git a/config/deploy.rb b/config/deploy.rb | |
index 4140c0b..acaa784 100644 | |
--- a/config/deploy.rb | |
+++ b/config/deploy.rb | |
@@ -3,7 +3,7 @@ set :repository, "[email protected]:redmine.git" | |
set :scm, :git | |
set :git_enable_submodules,1 | |
#set :deploy_via, :remote_cache | |
-set :deploy_via, :copy |
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
# /etc/init.d/nginx | |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server |
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
$ ruby -v | |
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] | |
>> cmd = "puts Time.local(2009).zone" | |
=> "puts Time.local(2009).zone" | |
>> ['PST', 'CST'].each do |tz| | |
?> ENV['TZ'] = tz | |
?> puts `ruby -e \"#{cmd}\"` # Prints two different values on Windows | |
?> end | |
UTC |
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
# vendor/plugins/plugin_a/init.rb | |
Dispatcher.to_prepare do | |
require_dependency 'application' # for ApplicationController | |
ApplicationController.send(:include, PluginAPatch) | |
end |
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
FatFreeCRM::Plugin.register(:fat_free_issues, initializer) do | |
name "Fat Free Issues" | |
author "PCCL" | |
version "1.0" | |
description "Basic support for issues" | |
dependencies :simple_column_search, :uses_mysql_uuid, :uses_user_permissions | |
end |
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
#!/bin/bash | |
TZ='America/Los_Angeles'; export TZ | |
## All projects | |
# /home/websites/projects.littlestreamsoftware.com/current/script/runner -e production "Repository.fetch_changesets" | |
## Only active projects | |
/home/websites/projects.littlestreamsoftware.com/current/script/runner -e production "Project.find_all_by_status(Project::STATUS_ACTIVE).collect(&:repository).compact.each {|repo| repo.fetch_changesets }" |