- The A/B Test: Inside the Technology That’s Changing the Rules of Business (Wired, April 2012)
- Stop Redesigning, Start Tuning your Website (Smashing Magazine, May 2012)
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 Dir | |
def Dir.glob_in(path, *args) | |
original_dir = Dir.pwd | |
begin | |
Dir.chdir(path) | |
return Dir.glob(*args) | |
ensure | |
Dir.chdir(original_dir) | |
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
@query = params[:query] | |
pretty_keywords = [] | |
index_keywords = [] | |
Pericope.split(@query, /[\r\n,;]/).each do |keyword| | |
if keyword.is_a?(Pericope) | |
pretty_keywords << keyword.to_s | |
index_keywords << "(#{keyword.to_a.join(" | ")})" | |
else | |
keyword = keyword.strip |
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) Capybara::Driver::Zombie it should behave like driver with javascript support#drag_to should drag and drop an object | |
Failure/Error: @driver.find('//div[contains(., "Dropped!")]').should_not be_empty | |
expected empty? to return false, got true | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/fail_with.rb:29:in `fail_with' | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/handler.rb:44:in `handle_matcher' | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/extensions/kernel.rb:50:in `should_not' | |
# /opt/local/lib/ruby/gems/1.8/gems/capybara-0.4.0/lib/capybara/spec/driver.rb:93 | |
jQuery draggable.start and draggable.stop events are fired. |
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 'rubygems' | |
require 'sinatra' | |
get '/ga' do | |
<<-HTML | |
<html> | |
<head> | |
<title>Google Analytics Test</title> | |
</head> | |
<body> |
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 'rubygems' | |
require 'sinatra' | |
get '/image' do | |
<<-HTML | |
<html> | |
<head> | |
<title>new Image Test</title> | |
</head> | |
<body> |
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
public static DateTime FindEaster( int year ) { | |
int month, day, century, n, m, i, j, k, z, a, l; | |
century = year / 100; | |
n = year % 19; | |
m = (century - 17) / 25; | |
i = century - (century >> 2) - (int)((century - m) / 3) + 19 * n + 15; | |
j = i % 30; | |
z = (int)(j / 28); | |
k = j - z * (1 - z * (int)(29 / (j + 1)) * (int)((21 - n) / 11)); |
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 'formula' | |
class Pdftk < Formula | |
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip' | |
homepage 'http://www.pdflabs.com/' | |
md5 '9eb50fffcd621a627d387750c60982b4' | |
# depends_on 'gcc' # with "--enable-java" option , required "Homebrew-alt" . | |
# via : https://github.com/adamv/homebrew-alt/ | |
def install |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# https://gist.github.com/boblail/5587579 | |
require 'benchmark' | |
require 'nokogiri' | |
require 'progressbar' | |
require 'tempfile' | |
class SqlRocket < Nokogiri::XML::SAX::Document |
OlderNewer