Skip to content

Instantly share code, notes, and snippets.

@geelen
geelen / gist:36960
Created December 17, 2008 06:18 — forked from benhoskings/gist:36955
undefined
def number_to_ordinal num
int = num.to_i
int.to_s + ((10...20) === int) ? "th" : (%w{th st nd rd}[int % 10] or "th")
end

== Introduction ==

'''Tom Adams''', Workingmouse, December 2007

I've had the good fortune to recently complete a project at [http://www.veitchlister.com.au/ Veitch Lister Consulting (VLC)] (a transport planning consultancy) processing large datasets in real-time. This article is a summary of the technical aspects of the project, I won't be talking about the process we used, suffice to say it was XP-like, supported by tools such as my BDD framework [http://instinct.googlecode.com/ Instinct] and web-based agile project management tools. The project ran for around 7-9 weeks, the team was comprised of five developers (3 full-time on the project) consisting of two Workingmouse developers, myself and Sanjiv Sahayam, and three VLC developers, Jamie Cook, Glen Maddern and Nick Partridge.

As a [http://workingmouse.com/ consultancy] we usually work in corporate environments and as such are bound by the architectural constraints of the organisation. This usually includes the usual "enterprise" constraints such

desc "Grab the html files and pdf-ize them through safari"
task :html_to_pdf => ['main.html', 'scalpel.html'] do
require 'rbosa'
run "rm ~/Desktop/cups-pdf/*", "Cleaning ~/Desktop/cups-pdf"
app = OSA.app('Safari')
files.each { |file|
app.make OSA::Safari::Document, :with_properties => { :url => "file://localhost/Users/glen/work/boost-doc/#{file}.html" }
sleep 1 while (app.do_javascript("document.readyState", app.documents[0]) != "complete")
app.print app.documents[0], :print_dialog => false
output_file = nil
<head>
<link type="text/css" rel="stylesheet" href="markdown-example/syntaxhighlighter_2.0.296/styles/shCore.css" />
<link type="text/css" rel="stylesheet" href="markdown-example/syntaxhighlighter_2.0.296/styles/shThemeDefault.css" />
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="markdown-example/syntaxhighlighter_2.0.296/scripts/shCore.js"></script>
<script type="text/javascript" src="markdown-example/syntaxhighlighter_2.0.296/scripts/shBrushJava.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("code").addClass("brush: java")
SyntaxHighlighter.config.tagName = "code";
-- go.applescript
--
-- Created by Glen Maddern on 2009-03-03.
-- Copyright (c) 2009 __MyCompanyName__. All rights reserved.
--
on run
-- do something useful
public final class AnF implements F<String, Integer> {
public Integer f(String s) {
return Integer.parseInt(s);
}
}
public interface AnotherF extends F<String,Integer> {
static AnotherF _ = new AnotherF() {
public Integer f(String s) {
return Integer.parseInt(s);
str = `some_command 2> /dev/stdout`
str.should =~ /rake aborted!/
str.should =~ /No files to process!/
IMEI:
01 161300 495823 4
ICCID:
8961 0299 0861 9306 356
________ __ ___ __ __
/ ____/ /__ ____ / |/ /___ _____/ /___/ /__ _________
/ / __/ / _ \/ __ \ / /|_/ / __ `/ __ / __ / _ \/ ___/ __ \
/ /_/ / / __/ / / / / / / / /_/ / /_/ / /_/ / __/ / / / / /
\____/_/\___/_/ /_/ /_/ /_/\__,_/\__,_/\__,_/\___/_/ /_/ /_/
__ __ __ __ __ __
/ \ |__| _) _) /| /| (__) |__| / \ |_
\__/ | /__ __) | | (__) | \__/ __)
___ _
/___\_ __ | |_ _ __ _ _ __
// // '_ \| | | | | / _` | '_ \
/ \_//| | | | | |_| | | (_| | | | |
\___/ |_| |_|_|\__, | \__,_|_| |_|
|___/
_ _ _ _ _ _
(_)_ __ __| (_)_ _(_) __| |_ _ __ _| | ___ _ __
| | '_ \ / _` | \ \ / / |/ _` | | | |/ _` | | / _ \| '__|
| | | | | (_| | |\ V /| | (_| | |_| | (_| | | | (_) | |