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": "Drupal", | |
"members": [ | |
{ | |
"name": "Wang Qiu", | |
"role": "Team Lead", | |
"motto": "", | |
"avatar": "https://2.gravatar.com/avatar/7ed23c4532204410539c551c405ce213?d=https%3A%2F%2Fidenticons.github.com%2Fe66953f95ec27b59aab57b32b630cfda.png&r=x&s=460" | |
} | |
/*, others */ |
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 asyncRandom() { | |
return function (fn) { | |
setTimeout(function () { | |
fn(Math.random()); | |
}, 10); | |
}; | |
} | |
function *gen1() { | |
var a = yield asyncRandom(); |
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
<?php | |
function ago($time) | |
{ | |
$periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade"); | |
$lengths = array("60","60","24","7","4.35","12","10"); | |
$now = time(); | |
$difference = $now - $time; | |
$tense = "ago"; |
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 |
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
{ | |
"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
'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
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
// 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
'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: [ |