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
namespace :translations do | |
desc "Show available locales" | |
task :available => :environment do | |
puts "Available locales: #{I18n.available_locales.join(', ')}" | |
end | |
desc "Show missed translations depending on default language environment (:#{I18n.default_locale} by default). You can change it providing LOCALE argument" | |
task :missed => :environment do | |
locale = ENV['LOCALE'] || I18n.default_locale | |
puts "Using :#{locale} as default locale" |
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
before "deploy:rollback:revision", "deploy:rollback_database" | |
desc "Rolls back database to migration level of the previously deployed release" | |
task :rollback_database, :roles => :db, :only => { :primary => true } do | |
if releases.length < 2 | |
abort "could not rollback the code because there is no prior release" | |
else | |
rake = fetch(:rake, "rake") | |
rails_env = fetch(:rails_env, "production") | |
migrate_env = fetch(:migrate_env, "") |
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
ssh_options[:forward_agent] = true | |
set :keep_releases, 2 | |
set :application, "blabla.com" | |
set :repository, "git@blabla.com:myapp.git" | |
set :scm, :git | |
set :branch, "master" | |
set :user, "usename" | |
set :deploy_to, "/home/username/www/myapp/" | |
set :deploy_via, :remote_cache |
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
function XHConn() | |
{ | |
var xmlhttp, bComplete = false; | |
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } | |
catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } | |
catch (e) { try { xmlhttp = new XMLHttpRequest(); } | |
catch (e) { xmlhttp = false; }}} | |
if (!xmlhttp) return null; | |
this.connect = function(sURL, sMethod, sVars, fnDone) | |
{ |
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
link_to_remote("Post a comment", :update => "wiki-comment-form", :url => {:action => "show_add_comment", :id => @space, :wiki_id => @wiki_version}, | |
:before => visual_effect(:appear, "load_dots", :queue => 'end'), | |
:complete => visual_effect(:fade, "load_dots") + visual_effect(:fade, 'flows-w') + visual_effect(:appear, 'wiki-comment-form', :queue => 'end')) | |
encodeURIComponent(location.href) | |
Form.getInputs(form, 'radio', name).each(function(input) { | |
if (input.value == value) { | |
input.checked = true |