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 Admin::SportsController < Admin::AdminController | |
before_filter :validate_admin_rights | |
admin_assistant_for Sport do |aa| | |
aa.actions :index, :create, :update | |
aa.index.columns :id, :name, :member_count, :groups_count, :enabled, :drills_enabled, :organizations, :player_term | |
aa.index.per_page 100 | |
aa.index.sort_by 'name ASC' | |
aa.index.include :organizations | |
aa[:enabled].label = "Hub Enabled?" |
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
diff --git a/lib/admin_assistant/request/index.rb b/lib/admin_assistant/request/index.rb | |
index de6b761..f0371e5 100644 | |
--- a/lib/admin_assistant/request/index.rb | |
+++ b/lib/admin_assistant/request/index.rb | |
@@ -15,6 +15,9 @@ class AdminAssistant | |
@admin_assistant, @controller.params, controller_methods | |
) | |
@controller.instance_variable_set :@index, index | |
+ if @controller.respond_to?(:before_render_for_index) | |
+ @controller.send :before_render_for_index |
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
~/devprojects/rails/tools/profile config/environment.rb | |
cache classes = true | |
with AS with AA Savings | |
Mem Objs ms RSS Mem Objs ms RSS Mem Objs ms RSS | |
236394.54 1574652 26835.9 115492 224070.60 1365837 23570.7 111984 | |
236394.56 1575110 25262.4 115556 224070.81 1365889 23500.1 112024 | |
236394.66 1574652 25886.1 115484 224070.81 1365889 23500.1 112024 | |
236394.66 1574652 25886.1 115484 224070.82 1365837 23754.9 111996 | |
236394.56 1574651 26932.8 115564 224070.82 1365889 23345.8 112028 |
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
Run 1 Run 2 Run 3 Run 4 Run 5 Average | |
rake spec 119.10 99.09 101.29 100.89 97.69 103.61 | |
rake parallel:spec 90.86 90.19 91.06 87.99 90.63 90.15 | |
Time savings 13.46 | |
Savings as % of orig = 12.99% | |
Source data: |
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
# def handle_exception_with_exception_notifier(exception) | |
# params_to_send = (respond_to? :filter_parameters) ? filter_parameters(params) : params | |
# ExceptionNotifier.notify(exception, {:request => request, :session => session}.merge(params_to_send)) | |
# end | |
class ExceptionNotifier | |
include Singleton | |
def rescue_action_in_public(exception) | |
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
~ $ mkdir src | |
~ $ cd src | |
~/src $ wget http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz | |
~/src $ tar xzvf ruby-enterprise-1.8.6-20090610.tar.gz | |
~/src $ sudo ./ruby-enterprise-1.8.6-20090610/installer --auto=/opt/ruby-enterprise-1.8.6-20090610 |
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 | |
source_dir = nil | |
if ARGV[0] == 'ree' | |
source_dir = lambda { |binary| "/opt/ruby-enterprise-1.8.6-20090610/bin/#{binary}" } | |
elsif ARGV[0] == 'mri' | |
source_dir = lambda { |binary| "/usr/bin/#{binary}18" } | |
else | |
raise ArgumentError.new("acceptable args are 'mri' and 'ree'") | |
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
#!/bin/sh | |
export RUBY_HEAP_MIN_SLOTS=500000 | |
export RUBY_HEAP_SLOTS_INCREMENT=250000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=50000000 | |
exec "/usr/bin/ruby" "$@" |
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
POST http://www.kaltura.com/index.php/partnerservices2/getuiconf | |
Host: www.kaltura.com | |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: en-us,en;q=0.5 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 | |
Connection: keep-alive |
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
WE.RealtimeNotificationListener = (function(){ | |
var instanceMethods = {}; | |
var staticMethods = { | |
listen: function(channel, notificationHandler) { | |
var realtimeNotificationsUrl = "http://" + location.host + "/rt/notifications?id=" + channel; | |
var realtimeNotificationsCookieName = 'channel_last_mod_' + channel; | |
var storedLastModifiedDate = $.cookie(realtimeNotificationsCookieName); | |
if (storedLastModifiedDate !== null) { | |
$.lastModified[realtimeNotificationsUrl] = storedLastModifiedDate; | |
} |