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('@selenium') do | |
if ENV["SELENIUM_HEADLESS"] == 'true' | |
require "headless" | |
@headless = Headless.new | |
@headless.start | |
end | |
end | |
After('@selenium') do | |
@headless.destroy if @headless.present? |
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
Feature: Cool AJAX autocomplete | |
Scenario: Autocomplete city | |
When I fill in "City" with "Madr" | |
Then I should see "Madrid, Spain" | |
When I follow "Madrid, Spain" | |
Then the field "City" should contain "Madrid, Spain" |
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
the work-around is to get a console ("irb -rinit") and do "Integrity::Build.all.select { |b| b.commit.nil? }.each { |b| b.destroy! }" |
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
require 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'rubygems' | |
require 'wirble' | |
require 'hirb' | |
#completion | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] |
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
$(function(){ | |
$("select#search_country_id").change(function(){ | |
$("img#spinner_city_id").show(); | |
$("select#search_city_id").disable(); | |
$.getJSON("/cities.json",{country_id: $(this).val(), ajax: 'true'}, function(j){ | |
var options = ''; | |
for (var i = 0; i < j.length; i++) { | |
options += '<option value="' + j[i]["city"]["id"] + '">' + j[i]["city"]["name"] + '</option>'; | |
} | |
$("select#search_city_id").html(options); |
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
namespace :ci do | |
task :copy_yml do | |
sh "cp #{Rails.root}/config/example_database.yml #{Rails.root}/config/database.yml" | |
end | |
desc "Prepare for CI and run entire test suite" | |
task :build do | |
Rake::Task['db:migrate'].invoke | |
Rake::Task['db:test:prepare'].invoke | |
Rake::Task['test:units'].invoke |