Skip to content

Instantly share code, notes, and snippets.

View antonio's full-sized avatar

Antonio Santos antonio

View GitHub Profile
def fill_in_select2(selector, options={})
container = "#s2id_#{selector}"
page.find("#{container} a").click
page.find(".select2-search input.select2-input").set options[:with]
page.first(".select2-match").click
end
@antonio
antonio / 0-readme.md
Created December 13, 2012 14:40 — forked from burke/0-readme.md

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@antonio
antonio / wottam.rb
Created March 1, 2012 13:20 — forked from juanghurtado/wottam.rb
Wottam description
def wottam
3.times { puts "AWESOME!" }
end
@antonio
antonio / TestCache.java
Created December 14, 2011 10:37 — forked from alecarrod/TestCache.java
Problem spying cache
Test Code:
package es.juntadeandalucia.icms.server.cache;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.internal.verification.VerificationModeFactory.atLeastOnce;
import static org.mockito.internal.verification.VerificationModeFactory.times;