Some interesting gems to consider.
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("@culerity,@celerity,@javascript") do |scenario| | |
unless @env_rvm_jruby | |
@env_rvm_jruby = {} | |
require 'yaml' | |
rvm_info = YAML::load(`bash -l -c 'source ~/.rvm/scripts/rvm; rvm jruby ; rvm info'`) | |
rvm_info['environment'].each do |k, v| | |
@env_rvm_jruby[k] = v | |
end | |
@env_jruby_path = rvm_info['binaries']['ruby'].gsub(%r{^(.*)/ruby$}, '\1') | |
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
## I18n backends benchmarks | |
# | |
# All these benchmarks were performed using REE with the suite at | |
# at http://github.com/svenfuchs/i18n/tree/master/benchmark/run.rb | |
# | |
# When compared to ActiveRecord backend, Redis and Tokyo | |
# just cannot store procs. All other tests pass. | |
# | |
# Used rufus-tokyo (1.0.7) and redis (2.0.0) as gems and N = 10. |
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
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case | |
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement | |
Please fork, tweet about, etc. | |
---- | |
Creating Shazam in Java | |
A couple of days ago I encountered this article: How Shazam Works | |
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java? |
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
#---------------------------------------------------------------------------- | |
# Git Setup | |
#---------------------------------------------------------------------------- | |
file '.gitignore', <<-FILE | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
public/uploads/* |
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 Configuration | |
attr_accessor :tail_logs, :max_connections, :admin_password | |
attr_accessor :app_server | |
def app_server | |
@app_server_config ||= AppServer.new | |
yield @app_server_config if block_given? | |
@app_server_config | |
end | |
end |
This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).
Huge thanks to funny-falcon for the performance patches.
This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).
Huge thanks to funny-falcon for the performance patches.
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 decorate_resource_or_collection(item_or_items) | |
klass = item_or_items.is_a?(Array) ? item_or_items.first.class.to_s : item_or_items.class.to_s | |
(klass + "Decorator").constantize.decorate(item_or_items) | |
rescue NameError | |
item_or_items | |
end | |
... |