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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<title>QUnit/Sinon.JS</title> | |
<link rel="stylesheet" href="vendor/qunit/qunit.css" type="text/css" media="screen"> | |
</head> | |
<body> | |
<h1 id="qunit-header">QUnit/Sinon.JS Test</h1> | |
<h2 id="qunit-banner"></h2> |
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
include('Zend/Feed/Rss.php'); | |
include('Zend/Dom/Query.php'); | |
$feed = new Zend_Feed_Rss('http://example.com/rss'); | |
foreach ($feed as $item) { | |
# where feed contains an <a href="" />, use that as the RSS <link> value | |
$dom = new Zend_Dom_Query(html_entity_decode($item->description())); | |
$anchor = $dom->query('a'); |
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 ("undefined" === typeof String.trim) { | |
String.prototype.trim = function() { | |
return this.replace(/^\s+|\s+$/g,""); | |
} | |
} |
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
/** | |
* Splits a string on a given separator and compares each part | |
* @returns {Boolean} True is all parts are equal, false if not | |
*/ | |
String.prototype.equate = function (separator) { | |
return this.split(separator).every(function(element, index, array){ | |
return (element === array[0]); | |
}); | |
} |
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
# Cucumber has a nice feature where it can wrap code _around_ a | |
# scenario. In my case I have a Varnish cache running on port 6081 | |
# and an plain apache on port 80 and various tests that rely | |
# on both services. So this way I can temporarily monkey patch the | |
# Capybara host if I tag any feature with '@varnish' and have the | |
# http traffic hit the cache. | |
Around('@varnish') do |scenario, block| | |
default_host = Capybara.default_host | |
Capybara.default_host = Capybara.default_host.gsub(/(:\d+)$/, ':6081') |
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
# This took me an hour or so to figure out as the documentation is a bit | |
# sparse, but the gherkin gem ships with a json formatter | |
require 'rubygems' | |
require 'gherkin' | |
require 'gherkin/formatter/json_formatter' | |
require 'gherkin/parser/parser' | |
require 'json' |
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
Installed Packages | |
GConf2.x86_64 2.14.0-9.el5 installed | |
GraphicsMagick.x86_64 1.3.12-2.bbc installed | |
MAKEDEV.x86_64 3.23-1.2 installed | |
NetworkManager.x86_64 1:0.7.0-13.el5 installed | |
NetworkManager-glib.x86_64 1:0.7.0-13.el5 installed | |
ORBit2.x86_64 2.14.3-5.el5 installed | |
SysVinit.x86_64 2.86-17.el5 installed | |
acl.x86_64 2.2.39-6.el5 installed | |
acpid.x86_64 1.0.4-9.el5_4.2 installed |
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 to /etc/profile and source it, then you can type `drop [file|folder]` to transfer | |
# files to some remote host, or 'drops' to list all drops, or 'undrop [file] | |
export DROPHOST=example.com | |
export DROPUSER=username | |
export DROPPATH=/home/path/to/folder | |
export DROPWEBROOT=/drop | |
# drop a file or folder & copy the resulting url to your clipboard | |
function drop() { |
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
<ol> | |
<li> | |
<a href="http://news.bbc.co.uk/democracylive/hi/northern_ireland/newsid_9583000/9583548.stm?t=86s">00:01:28</a>you find out who the <strong>some term</strong> the US and the</li> | |
</ol> |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
builder (3.0.0) | |
capybara (1.1.2) | |
mime-types (>= 1.16) | |
nokogiri (>= 1.3.3) | |
rack (>= 1.0.0) | |
rack-test (>= 0.5.4) | |
selenium-webdriver (~> 2.0) |
OlderNewer