Skip to content

Instantly share code, notes, and snippets.

export MOZ_NO_REMOTE=1
export DISPLAY=:0.0
nohup selenium >> /var/log/selenium.log 2>&1 &
@btakita
btakita / gist:10170
Created September 11, 2008 05:31 — forked from saki/gist:10168
.table {
display: table;
width: 95%;
border-spacing: 2px 2px;
border-color: gray;
border-collapse: collapse;
}
.table-caption {
display: table-caption;
*.iml
*.ipr
*.iws
/dev/sda1 / ext3 relatime,errors=remount-ro 0 1
require "benchmark"
Benchmark.bm do |x|
5.times do
x.report do
o = Object.new
10000.times do
def o.method; end
end
end
end
commit 41df2a49059616a1103b6276fb1bee1a18b21d01
Author: Brian Takita <btakita@btakita-laptop.(none)>
Date: Sat Nov 29 18:44:56 2008 -0500
Changed RecordedCalls#matches? to #match_error in anticipation of having reasons a match fails.
module Capistrano::Configuration::Connections
alias_method :execute_on_servers_without_ignoring_no_matching_server_error, :execute_on_servers
def execute_on_servers_with_ignoring_no_matching_server_error(*args, &block)
execute_on_servers_without_ignoring_no_matching_server_error(*args, &block)
rescue Capistrano::NoMatchingServersError => e
logger.info "skipping `#{current_task.fully_qualified_name}' because no servers matched"
end
alias_method :execute_on_servers, :execute_on_servers_with_ignoring_no_matching_server_error
end
Erector::Widgets::Table.create do
column :first_name
column :last_name
column :email
row_classes :even, :odd
end.insert(self, :row_objects => users)
#################
widget(Erector::Widgets::Table.create do
# TODO: BT - Remove this when this is integrated into RR.
#Adding this monkey patch to get around issue with Double R and named scopes
RR::DoubleInjection.class_eval do
def initialize(subject, method_name)
@subject = subject
@method_name = method_name.to_sym
if object_has_method?(method_name)
begin
meta.__send__(:alias_method, original_method_name, method_name)
rescue NameError => e
class ApplicationController < ActionController::Base
protected
def update_page(callback_base_name = @action_name, &block)
callback_name = "on_#{callback_base_name}"
render :update do |page|
args = block ? instance_eval(&block) : []
args = [args] unless args.is_a?(Array)
page << "page.#{callback_name}.apply(page, #{args.to_json})"
end
end