Skip to content

Instantly share code, notes, and snippets.

require 'benchmark'
N = 200
range = 1..5000
Benchmark.bmbm do | x |
x.report "loop" do
N.times do
a = []
for i in range
a << lambda{ i }
require 'benchmark'
N = 200
range = 1..5000
Benchmark.bmbm do | x |
x.report "loop" do
N.times do
a = []
for i in range
a << lambda{ i }
→ rvm --trace --textmate 1.8.6@RivalMap ; ls -alht ~/.rvm/bin/t*
--trace --textmate 1.8.6@RivalMap
rvm 0.1.28 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
+__rvm_parse_args:361> [[ -z '' ]]
+__rvm_parse_args:361> [[ ! -z '' ]]
+__rvm_parse_args:362> [[ ! -z '' ]]
+__rvm_parse_args:362> [[ ! -z '' ]]
+__rvm_parse_args:3> [[ 2 -gt 0 ]]
#!/usr/bin/env ruby
require 'hornetseye'
include Hornetseye
class Sequence_
def avg
sum / size
end
def sqr
self * self
end
find(//input[@type='color'][@id=//label[text()='user_email']/@for])
find(//input[@type='tel'][@id=//label[text()='user_email']/@for])
find(//input[@type='search'][@id=//label[text()='user_email']/@for])
find(//input[@type='url'][@id=//label[text()='user_email']/@for])
find(//input[@type='email'][@id=//label[text()='user_email']/@for])
find(//input[@type='password'][@id=//label[text()='user_email']/@for])
find(//input[@type='text'][@id=//label[text()='user_email']/@for])
find(//textarea[@id=//label[text()='user_email']/@for])
find(//textarea[@id='user_email'])
find(//textarea[@name='user_email'])
C:\Users\Rick>java -jar selenium-server-standalone-2.0a2.jar
00:55:41.187 INFO - Java: Sun Microsystems Inc. 16.0-b13
00:55:41.187 INFO - OS: Windows 7 6.1 amd64
00:55:41.206 INFO - v2.0 [a2], with Core v2.0 [a2]
00:55:41.414 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
00:55:41.414 INFO - Version Jetty/5.1.x
00:55:41.414 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
00:55:41.414 INFO - Started HttpContext[/selenium-server,/selenium-server]
00:55:41.414 INFO - Started HttpContext[/,/]
00:55:41.508 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@6db3f829
091201 23:25:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.1.37-osx10.5-x86_64/
091201 23:25:04 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.1.37-osx10.5-x86_64/ is case insensitive
091201 23:25:05 [Note] Plugin 'FEDERATED' is disabled.
091201 23:25:07 InnoDB: Started; log sequence number 0 1644361415
091201 23:25:07 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/usr/local/mysql-5.1.37-osx10.5-x86_64//munimula.local.pid' (Errcode: 13)
091201 23:25:07 [ERROR] Can't start server: can't create PID file: Permission denied
091201 23:25:07 mysqld_safe mysqld from pid file /usr/local/mysql-5.1.37-osx10.5-x86_64//munimula.local.pid ended
091201 23:28:23 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.1.37-osx10.5-x86_64/
091201 23:28:24 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.1.37-osx10.5-x86_64/ is case insensitive
091201 23:28:24 [Note] Plugin 'FEDERATED
/* C code produced by gperf version 3.0.3 */
/* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
require 'spec/autorun'
require 'spec/rails'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
$ spec spec/unit/models/assessment_suite_spec.rb
/Users/rick/fifthrail/legalpm/vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `load_missing_constant': uninitialized constant Test::Spec::Example (NameError)
from /Users/rick/fifthrail/legalpm/vendor/rails/activesupport/lib/active_support/dependencies.rb:77:in `rake_original_const_missing'
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
from /Users/rick/fifthrail/legalpm/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb:22
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/rick/fifthrail/legalpm/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
from /Users/rick/fifthrail/legalpm/vendor/plugins/rspec/lib/spec/interop/test.rb:10
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'