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
# add this file capybara_wait_until.rb to your /test directory | |
module Capybara | |
class Session | |
## | |
# | |
# Retry executing the block until a truthy result is returned or the timeout time is exceeded | |
# | |
# @param [Integer] timeout The amount of seconds to retry executing the given block | |
# |
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 python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
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
<% if flash[:error].present? %> | |
<h3><%= flash[:error] %></h3> | |
<% else %> | |
<div id="fb-root"></div> | |
<div id="error-message"></div> | |
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : "<%= Facebook::CONFIG['app_id'] %>", |