Skip to content

Instantly share code, notes, and snippets.

@joshski
joshski / concat.pogo
Created January 7, 2013 08:27
concatenative pogo
async = require 'async'
one ! = 1
two ! = 2
plus ! (x, y) = x + y
log ! (x) = console.log (x)
concat (memo, item, callback) =
done = @(err, result)
callback (err, memo.concat(result))
function EbnfDiagram(gc) {
this.gc = gc;
this.styles = STYLES;
this.style = this.styles["DIAGRAM"];
this.init();
}
EbnfDiagram.prototype.getGC = function() {
return this.gc;
Sprint 2
Evaluate unit test framework options (some are unlikely to work on all devices)
Make unit tests run under node.js and in-browser
Make unit tests run in headless browser in hudson (when code is committed)
Sprint 3
Make spassky tool (runs tests on physical devices) usable by dev team
Improve spassky output: summarise passes/fails/devices and stack traces
Sprint 4
@joshski
joshski / patterns.js
Created July 8, 2011 14:16 — forked from jcleveley-zz/patterns.js
Javascript patterns
// namespace - single global variable for all news JS
var news = news || {};
// Example of a singleton as a revealing module
// When you only need one of something
news.preferences = (function (app, global) {
// Private variables
var persistent = true;
Feature: Anaphora
Scenario: Dog barks at cat
Given there is a dog
And there is a cat
When the dog barks at the cat
Then the cat should run away
/* SiteCatalyst code version: H.23.3.
Copyright 1996-2011 Adobe, Inc. All Rights Reserved
More info available at http://www.omniture.com */
var s_account="bbciptvnewsdev"
var s=s_gi(s_account)
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */
s.charSet="ISO-8859-1"
/* Conversion Config */
@joshski
joshski / example.cakefile
Created April 16, 2011 08:54
My first cakefile
CoffeeScript = require 'coffee-script'
{exec} = require 'child_process'
fs = require 'fs'
SOURCES = [
'app',
'line'
]
task 'features', 'Run the cucumber features (with mininal output)', ->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/div/html4/strict.dtd">
<html>
<head>
<title>Tiny Samsung Video App</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type='text/javascript' language='javascript' src='$MANAGER_WIDGET/Common/API/Widget.js'></script>
</head>
<body onload="bodyLoad()" onunload="bodyUnload()">
<object id="videoPlugin" border=0 classid="clsid:SAMSUNG-INFOLINK-PLAYER"></object>
<object id="audioPlugin" border=0 classid="clsid:SAMSUNG-INFOLINK-AUDIO"></object>
import System.IO
import Network
import Minecraft
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Trans
import Control.Monad.BinaryProtocol
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan
> cucumber --version
0.6.3
Scenario Outline: Incorrect Search Output
When I do an invalid search of: "<keywords>"
Then an invalid search result page of "<response>" should not be returned!
Examples:
| keywords | response |