Skip to content

Instantly share code, notes, and snippets.

/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
@thilo
thilo / patiently.rb
Created June 11, 2010 12:22 — forked from langalex/patiently.rb
holzhammer methode für Ajax Calls
def patiently(&block)
cycles = 0
begin
yield
rescue => e
cycles += 1
sleep 0.1
if cycles < 10
retry
else
# rubygems DNS is temporarily down, put this into your /etc/hosts to install gems,
# but don't forget to remove the entries once their DNS is back up again
72.4.120.124 rubygems.org
207.171.181.231 production.s3.rubygems.org
216.137.45.24 production.cf.rubygems.org
@thilo
thilo / custom_steps.rb
Created June 4, 2010 09:33 — forked from terrainoob/custom_steps.rb
capybara with subdomains
Given /^I visit subdomain "(.+)"$/ do |sub|
#host! "#{sub}.example.com" #for webrat
Capybara.default_host = "#{sub}.example.com" #for Rack::Test
Capybara.app_host = "http://#{sub}.example.com:9887" if Capybara.current_driver == :culerity
################################################################################
# As far as I know, you have to put all the {sub}.example.com entries that you're
# using in your /etc/hosts file for the Culerity tests. This didn't seem to be
# required for Rack::Test
################################################################################