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
Scenario: | |
Given I have made a pick up order | |
When I post a review | |
Then it should work |
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
<?php | |
$buildFiles = array(); | |
$builds = array(); | |
foreach ( $files as $controller => $controllerFiles ){ | |
foreach ( $controllerFiles as $file ){ | |
if ( !isset($buildFiles[$file]) || !is_array($buildFiles[$file]) ){ | |
$buildFiles[$file] = array(); | |
} | |
$buildFiles[$file][] = $controller; |
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
<?php | |
public static function getTokenObject(){ | |
if ( !is_a(self::$instance,"Wpsqt_Tokens") ){ | |
self::$instance = new Wpsqt_Tokens(); | |
self::$instance->addToken("USER_NAME", "The name of the user who has taken the quiz or survey.") | |
->addToken("QUIZ_NAME", "The name of the quiz that has been taken, <strong>same as %SURVEY_NAME%</strong>.") | |
->addToken("SURVEY_NAME", "The name of the survey that has been taken, <strong>same as %QUIZ_NAME%</strong>.") | |
->addToken("DATE_EU", "The date the quiz or survey was taken in EU format.") |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'slop' | |
options = Slop.parse do | |
banner "Usage: foo.rb [options]" | |
on :v, :verbose, 'Enable verbose mode' , :default => false | |
on :d, :dir, 'The directory to be backed up', true , :optional => false | |
on :w, :wordpress, 'Is a WordPress site to be backed up' , :default => false |
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
threads = [] | |
tracking = ['#potbot','@potbot1','#potbottest','#fml','#cool'] | |
for trackWord in tracking | |
threads << Thread.new({ :object => TweetStream::Client.new("username", "password"), :word => trackWord }) { |data| | |
word = data[:word] | |
stream = data[:object] | |
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
Iain-Cambridges-MacBook-Pro:~ wackiebackie$ clear | |
Iain-Cambridges-MacBook-Pro:~ wackiebackie$ ruby -v | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0] | |
Iain-Cambridges-MacBook-Pro:~ wackiebackie$ gem -v | |
1.3.7 | |
Iain-Cambridges-MacBook-Pro:~ wackiebackie$ sudo gem install rails | |
Successfully installed rails-3.1.0 | |
1 gem installed | |
Installing ri documentation for rails-3.1.0... |
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
<?php | |
namespace app\tests\cases\controllers; | |
use app\controllers\ArticlesController; | |
use app\tests\mocks\MockArticlesController; | |
class ArticlesControllerTest extends \lithium\test\Unit { | |
protected $_controller; |
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
<?php | |
/** | |
* Web Spider class | |
* | |
* @author Iain Cambridge | |
* @package WebSpider | |
* @version 0.1 | |
*/ |
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
<?php | |
print "Start".PHP_EOL; | |
$proxyList = file_get_contents('proxylist.txt'); | |
$proxyList = explode(PHP_EOL, $proxyList); | |
$userAgents = array("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7", | |
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)", | |
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"); | |
foreach ($proxyList as $proxy) { | |
list($proxyUrl,$proxyPort) = explode(':',$proxy); |
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
<?php | |
namespace app\tests\mocks\controllers; | |
use app\controllers\ArticlesController; | |
class MockArticlesController extends ArticlesController { | |
protected $_classes = array( | |
'media' => 'lithium\net\http\Media', |