Skip to content

Instantly share code, notes, and snippets.

View farrelley's full-sized avatar

Shaun Farrell farrelley

View GitHub Profile
<?php
$configPaths = sprintf(
'%s/config/{,*.}{global,%s,local}.php',
APPLICATION_PATH,
SLIM_MODE
);
$config = Zend\Config\Factory::fromFiles(glob($configPaths, GLOB_BRACE));
<legislativeMandates>
<ClingerCohenAct description="String">String</ClingerCohenAct>
<WalshHealyAct description="String">String</WalshHealyAct>
<serviceContractAct description="String">String</serviceContractAct>
<DavisBaconAct description="String">String</DavisBaconAct>
<interagencyContractingAuthority description="String">String</interagencyContractingAuthority>
<otherStatutoryAuthority>String</otherStatutoryAuthority>
</legislativeMandates>
@farrelley
farrelley / README.md
Last active April 9, 2017 18:36
Dashing Airport Wait Times Dashboard Widget
# Page
---
layout: xyz
title: Test Post
some_id: ABC
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
# template
---
I was trying to just write a rspec for the Clat model.
method self.active
def self.active
Clat.expire_clats
where(:active => true)
end
this is what i was doing in rspec
1) ApplicationAdmin_Integration_Domain_ImportTest::testCourseImporterSuccessfullyCreatesCfpCourseFromSchweserDataSource
Exception: array_fill(): Number of elements must be positive
#0 [internal function]: PHPUnit_Util_ErrorHandler::handleError(2, 'array_fill(): N...', '/home/sfarrell/...', 116, Array)
#1 /home/sfarrell/sandboxes/core/code/applicationLms/classes/dao/test.php(116): array_fill(0, 0, '?')
#2 /home/sfarrell/sandboxes/core/code/applicationAdmin/classes/domain/content/test.php(30): Dao_Test->getQuestionDataByQuestionAssignmentIds(Array)
#3 /home/sfarrell/sandboxes/core/code/tests/integration/applicationAdmin/classes/domain/importTest.php(412): Admin_Domain_Content_Test->getHash()
#4 [internal function]: ApplicationAdmin_Integration_Domain_ImportTest->testCourseImporterSuccessfullyCreatesCfpCourseFromSchweserDataSource()
#5 /home/sfarrell/sandboxes/core/code/utilities/PHPUnit/PHPUnit/Framework/TestCase.php(927): ReflectionMethod->invokeArgs(Object(ApplicationAdmin_Integration_Domain_ImportTest), Arra
@farrelley
farrelley / Test.php
Created June 30, 2012 20:38
This is a test File
<?php
echo "Ronnie Brown";
foreach ($test as $t) {
echo $t;
}
@farrelley
farrelley / ttb-goutte-crawl.php
Created June 6, 2012 00:03
Trying to get a list of TTB ID numbers for a specified date. The code works but I am missing something. I keep getting an error "<?php require_once 'goutte.phar'; use Goutte\Client; $client = new Client(); $guzzle = $client->getClient(); $guzzle->se
<?php
require_once 'goutte.phar';
use Goutte\Client;
$client = new Client();
$guzzle = $client->getClient();
$guzzle->setConfig(
array(
@farrelley
farrelley / gist:1281324
Created October 12, 2011 14:11
Segment Route
'user' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/user/:username',
'defaults' => array(
'controller' => 'index',
'action' => 'index',
),
'match' => array(
'username' => ':username'
<a href="<?php echo $this->url(
array(
'controller' => 'index',
'action' => 'test'
),
array('name' => 'default')
) ?>">test</a>