This file contains hidden or 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
{exec} = require 'child_process' | |
run = (command, callback) -> | |
exec command, (err, stdout, stderr) -> | |
console.warn stderr if stderr | |
callback?() unless err | |
build = (callback) -> | |
run 'coffee -co lib src', callback |
This file contains hidden or 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
a = [] | |
class << a | |
Array.instance_methods(false).each do |meth| | |
old = instance_method(meth) | |
define_method(meth) do |*args, &block| | |
old_size = size | |
old.bind(self).call(*args, &block) | |
size_changed(size) if old_size != size | |
end if meth != :size |
This file contains hidden or 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
'use strict' | |
module.exports = { | |
seleniumHost: 'http://localhost:4444/wd/hub', | |
browsers: ['firefox'], | |
envHosts: { | |
prodtest: 'http://prodtest.aami.com.au', | |
prod: 'http://www.aami.com.au' | |
}, | |
paths: [ |
This file contains hidden or 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
'use strict' | |
module.exports = { | |
seleniumHost: 'http://localhost:4444/wd/hub', | |
browsers: ['firefox'/*, 'chrome', 'safari', 'opera'*/], | |
envHosts: { | |
prodtest: 'http://prodtest.suncorpbank.com.au', | |
prod: 'http://suncorpbank.com.au' | |
}, | |
paths: [ |
This file contains hidden or 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
// function counter(initValue, seed) {} | |
// testcase | |
var incrementByOneFromOne = counter(1, 1); | |
incrementByOneFromOne.should.include.keys('value'); | |
incrementByOneFromOne.should.include.keys('increment'); | |
incrementByOneFromOne.should.include.keys('decrement'); | |
// testcase | |
var incrementByOneFromOne = counter(1, 1); |
This file contains hidden or 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
class Rate : IRate { | |
public Rate(CustomerType, weekdays, weekdayPrice, weekendPrice) { | |
// ..... | |
} | |
public double calculte (Days days...) { | |
double totalPrice = 0; | |
for(var day in days) { | |
if day is weekdays { |
This file contains hidden or 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
'use strict'; | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
mochacli: { | |
options: { | |
reporter: 'spec' | |
}, |
This file contains hidden or 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
{ | |
"name": "webdriver-helper", | |
"description": "JavaScript WebDriver Helper", | |
"version": "0.1.0", | |
"homepage": "https://github.com/tw/js-webdriver-helper", | |
"author": { | |
"name": "Wang Qiu", | |
"email": "[email protected]", | |
"url": "http://ishouldbeageek.me" | |
}, |
This file contains hidden or 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
#!/bin/bash | |
# Start the service selenium-server | |
start() { | |
echo "Starting selenium-server server." | |
export DISPLAY=:0 | |
java -jar /Users/tw/Projects/test/selenium-server-standalone-2.35.0.jar -role hub &>/dev/null & | |
PID=$! | |
### Create the lock file ### | |
echo $PID > /var/run/selenium-server.pid |
This file contains hidden or 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
#!/bin/bash | |
# /etc/init.d/jenkins | |
# debian-compatible jenkins startup script. | |
# Amelia A Lewis <[email protected]> | |
# | |
### BEGIN INIT INFO | |
# Provides: jenkins | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 |