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
describe Act do | |
describe "when asked for name and year" do | |
it 'should return "Abdication Act" for Act with title "Abdication Act" and nil year' do | |
act = Act.new(:name => "Abdication Act") | |
act.name_and_year.should == "Abdication Act" | |
end | |
it 'should return "Access to Health Records Act 1990" for Act with title "Access to Health Records Act" and year 1990' do |
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
describe HansardReference, 'when creating a reference' do | |
# checking matches # | |
it 'should match date in "27 October 2003, Official Report, column 55W"' do | |
should_match '27 October 2003, Official Report, column 55W' | |
end | |
it 'should match on "10 February 2004, Official Report, columns 1293–98W"' do | |
should_match '10 February 2004, Official Report, columns 1293–98W' |
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
set nocompatible | |
set autoindent | |
set smartindent | |
set showmatch | |
set ruler | |
set incsearch | |
set hlsearch | |
set showcmd | |
set ignorecase | |
set ttyfast |
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
# I've not included my IMAP config | |
set timeout = 0 | |
set mail_check = 0 | |
# I've not included my SMTP config | |
set header_cache =~/.mutt/cache/headers | |
set message_cachedir =~/.mutt/cache/bodies | |
set certificate_file =~/.mutt/certificates |
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
view layout [ text-list 600x200 data read/lines %completed.data button "ok" ] |
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
deposit_ref = "" | |
deposit_leg = "" | |
deposit_date = "" | |
if td.get('class') == "ref": | |
deposit_ref = td.text_content() | |
elif td.get('class') == "leg": | |
deposit_leg = td.text_content() |
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
<!-- | |
RewriteEngine on | |
RewriteRule ^([a-zA-Z0-9]+)$ index.php?$1 [L] | |
RewriteRule ^([a-zA-Z0-9]+)/$ index.php?$1 [L] | |
--> | |
<?php | |
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 'redcloth' | |
require 'erb' | |
task :default => [:test] | |
TEXTFILES = FileList['**/*.txt'] | |
desc "list txt files" | |
task :test do | |
puts TEXTFILES |
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
$feedUrl = 'http://www.theyworkforyou.com/search/rss/?s="'.$thequery.'"'; | |
$rawFeed = file_get_contents($feedUrl); | |
$xml = new SimpleXmlElement($rawFeed); | |
foreach ($xml->channel->item as $item) | |
{ | |
echo "<article>"; | |
echo '<p><a title="'.$item->link.'" href="'.$item->link.'">'.$item->title.'</a><!-- <br/><span class="abstract">' . $item->description . '</span> -->'; |
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
do http://reb4.me/r/altjson.r | |
board:to-string read http://countdown.tfl.gov.uk/stopBoard/58284 | |
boardblock: load-json/flat board | |
foreach arrival boardblock/<arrivals> [print [arrival/<routeId> "to" arrival/<destination> arrival/<estimatedWait>]] |
OlderNewer