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
<!-- app/views/admin/shared/_tinymce_enable.html.erb --> | |
<script charset="utf-8"> | |
var tinyMCEPreInit = { | |
base: '<%= asset_path('tinymce') %>', | |
suffix: '.min' | |
}; | |
$(function() { |
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
# Because we have some old legacy users in the database, we need to override Devises method for checking if a password is valid. | |
# We first ask Devise if the password is valid, and if it throws an InvalidHash exception, we know that we're dealing with a | |
# legacy user, so we check the password against the SHA1 algorithm that was used to hash the password in the old database. | |
#SOURCES OF SOLUTION: | |
# http://stackoverflow.com/questions/6113375/converting-existing-password-hash-to-devise | |
# https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/crypto_providers/sha512.rb | |
# https://github.com/plataformatec/devise/blob/master/lib/devise/encryptors/authlogic_sha512.rb | |
alias :devise_valid_password? :valid_password? | |
def valid_password?(password) |
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
<option value="001">Herr</option> | |
<option value="002">Frau</option> | |
<option value="Dr.">Dr.</option> | |
<option value="Prof.">Prof.</option> | |
<option value="Dr. Dr.">Dr. Dr.</option> | |
<option value="Prof. Dr.">Prof. Dr.</option> | |
<option value="Prof. Dr. Dr.">Prof. Dr. Dr.</option> | |
<option value="Konsul">Konsul</option> | |
<option value="Generalkonsul">Generalkonsul</option> |
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 'simplecov' | |
SimpleCov.command_name "acceptance" | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rails' | |
require 'capybara/poltergeist' |
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
description "nginx http daemon" | |
start on runlevel [2] | |
stop on runlevel [016] | |
console owner | |
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;" | |
respawn |
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
# encoding: UTF-8 | |
# Chiliproject to Redmine converter | |
# ================================= | |
# | |
# This script takes an existing Chiliproject database and | |
# converts it to be compatible with Redmine (>= v2.3). The | |
# database is converted in such a way that it can be run multiple | |
# times against a production Chiliproject install without | |
# interfering with it's operation. This is done by duplicating |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListBucket" | |
], | |
"Resource": [ | |
"arn:aws:s3:::xxx-redmine-backups" |
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 [ -f "${rvm_path}/scripts/rvm" ]; then | |
source "${rvm_path}/scripts/rvm" | |
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
elif [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then | |
rvm use `cat .ruby-version`@`cat .ruby-gemset` | |
elif [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` |
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
# Because we have some old legacy users in the database, we need to override Devises method for checking if a password is valid. | |
# We first ask Devise if the password is valid, and if it throws an InvalidHash exception, we know that we're dealing with a | |
# legacy user, so we check the password against the SHA1 algorithm that was used to hash the password in the old database. | |
#SOURCES OF SOLUTION: | |
# http://stackoverflow.com/questions/6113375/converting-existing-password-hash-to-devise | |
# https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/crypto_providers/sha512.rb | |
# https://github.com/plataformatec/devise/blob/master/lib/devise/encryptors/authlogic_sha512.rb | |
alias :devise_valid_password? :valid_password? | |
def valid_password?(password) |
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 ActiveRecord::Base | |
mattr_accessor :shared_connection | |
@@shared_connection = nil | |
def self.connection | |
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection } | |
end | |
end | |
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection |
OlderNewer