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
# local run with the sleep | |
#real 12m30.294s | |
# on devver with the sleep | |
#real 1m53.353s | |
require 'rubygems' | |
require 'test/unit' | |
require 'puzzle' | |
require 'pp' | |
require 'permutations' |
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 depends_on_pending_migrations_if_exists | |
task = 'db:abort_if_pending_migrations' | |
begin | |
Rake::Task[task].invoke | |
rescue RuntimeError | |
#noop this is not a rails project don't depend on this task | |
end | |
end | |
desc "A task I want considitonally dependant on migrations if this project is a rails project" |
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
1) Failure: | |
test: with a version should create gemspec with some dependencies. (VersionTest) | |
[/test/unit/version_test.rb:143:in `__bind_1256771802_829589' | |
vendor/bundler_gems/gems/shoulda-2.10.2/lib/shoulda/context.rb:351:in `call' | |
vendor/bundler_gems/gems/shoulda-2.10.2/lib/shoulda/context.rb:351:in `test: with a version should create gemspec with some dependencies. ' | |
vendor/bundler_gems/gems/activesupport-2.3.4/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__' | |
vendor/bundler_gems/gems/activesupport-2.3.4/lib/active_support/testing/setup_and_teardown.rb:62:in `run']: | |
<"RubyGem89"> expected but was | |
<"RubyGem90">. |
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
#just using this to trigger various warnings in reek, flay, saikuro, etc | |
#trying to trigger churn warning | |
desc "Perform some benchmarking against the production site" | |
task :benchmark do | |
puts "starting benchmarking" | |
fork_and_print("ab -c 100 -t 130 -n 1000 -r http://site.com/") | |
fork_and_print("ab -c 100 -t 130 -n 1000 -r http://site.com/contact") | |
fork_and_print("ab -c 100 -t 130 -n 1000 -r http://site.com/documentation/how_it_works\ | |
") |
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
#This is a few examples of how to use the devver.net Caliper API | |
require 'cgi' | |
require "uri" | |
require "restclient" | |
require 'ruby-debug' | |
require 'json' | |
class CaliperAPI |
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
# example of the configurations that can be passed to Caliper | |
# place this file in the root or config/ of your project | |
# and overide the settings as needed | |
directories_to_calculate: --- | |
- app | |
- lib | |
- docs | |
- src |
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
# example of the configurations that can be passed to Caliper | |
# name this file Caliper.yml | |
# place this file in the root or config/ of your project | |
# and overide the settings as needed | |
#this is an example for git://github.com/jcbozonier/DfaStringMatcher.git | |
directories_to_calculate: --- | |
- Source |
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
# example of the configurations that can be passed to Caliper | |
# name this file Caliper.yml | |
# place this file in the root or config/ of your project | |
# and overide the settings as needed | |
#this is an example for _redcar | |
directories_to_calculate: --- | |
- plugins |
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
~/projects/churn(master) > churn | |
dyld: lazy symbol binding failed: Symbol not found: _rb_intern2 | |
Referenced from: /Users/danmayer/.rvm/gems/ruby-1.9.1-p378/gems/json-1.2.0/ext/json/ext/parser.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _rb_intern2 | |
Referenced from: /Users/danmayer/.rvm/gems/ruby-1.9.1-p378/gems/json-1.2.0/ext/json/ext/parser.bundle | |
Expected in: flat namespace | |
Trace/BPT trap |
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
~/projects/churn(master) > which churn | |
/Users/danmayer/.rvm/gems/ruby-1.9.1-p378/bin/churn | |
mv /opt/local/bin/churn /opt/local/bin/bak_churn | |
~/projects/churn(master) > churn | |
-bash: /opt/local/bin/churn: No such file or directory | |
~/projects/churn(master) > which churn | |
/Users/danmayer/.rvm/gems/ruby-1.9.1-p378/bin/churn |