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 | |
class Zend_View_Helper_ViewHelperSkeleton extends Zend_View_Helper_Abstract | |
{ | |
public $view; | |
/** | |
* Allows the view to be passed into the helper for later use. | |
*/ | |
public function setView(Zend_View_Interface $view) | |
{ |
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
var simpleForm = { "elements": | |
{ "verb" : | |
{ "label" : "verb", | |
"id" : "verb", | |
"type" : "text", | |
"size" : "50" , | |
"element" : "input" | |
}, | |
"url" : | |
{ "label" : "url", |
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
function! OpenUnitTest() | |
let file = expand("%:p") | |
let words = split(getline(search('^class '))) | |
let words = split(words[1],"_") | |
let paths = matchlist(file, '\([A-Za-z0-9/].*\)/application') | |
let head = paths[1] | |
let path = "/tests" | |
let counter = 0 | |
for word in words | |
if counter < 2 |
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/perl | |
use DBI; | |
use Data::Dumper; | |
# Configuration Information | |
my $EOL = "\n"; | |
my $dbFile = "perl.anki"; | |
my $scriptStarting = "starting$EOL"; | |
my $scriptComplete = "done$EOL"; | |
my $sqlSelectAllCards = "SELECT * FROM cards"; |
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 | |
require_once('aws-sdk-for-php/sdk.class.php'); | |
$table_name = "queuesNStuff"; | |
function outputArray($output) | |
{ | |
print_r(nl2br(print_r($output->body->to_array(), TRUE))); | |
} | |
function outputJson($output) | |
{ |
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 | |
$sdb = new AmazonSDB("accessKey", "secretKey"); | |
$sdb->setRegion(AmazonSDB::REGION_US_E1); | |
$response = $sdb->create_domain("projects"); | |
print_r($response); |
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 | |
//much of this borrowed from the amazon documentation | |
//http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/LowLevelPHPTableOperationsExample.html | |
require_once('include.php'); | |
$response = $dynamoDB->query(array( | |
'TableName' => $properties["table"]["TableName"] | |
, 'HashKeyValue' => array( | |
$properties["table"]["KeySchema"]["HashKeyElement"]["AttributeType"] | |
=> $hashKey ) |
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
cd /tmp/ | |
hg clone http://hg.rabbitmq.com/rabbitmq-c/ rabbitmq-c | |
cd rabbitmq-c | |
hg clone http://hg.rabbitmq.com/rabbitmq-codegen codegen | |
autoreconf -i && ./configure && make && sudo make install | |
cd /tmp/ | |
lynx http://pecl.php.net/package/amqp #Download latest | |
tar -xvf amqp-1.0.1.tgz | |
cd amqp-1.0.1 | |
phpize && ./configure --with-amqp && make && sudo make install |
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
Header set Access-Control-Allow-Origin * | |
Header set Access-Control-Allow-Headers "X-Requested-With, Content-Type" | |
Header set Access-Control-Allow-Methods "PUT, POST, GET, OPTIONS, DELETE" |
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 | |
function removeSingularKeys($array, $parent="") | |
{ | |
$result = array(); | |
$result = $array; | |
foreach($array as $key => $value){ | |
if(keyIsTheSingularFormOf($key, $parent)){ | |
return $value; | |
} | |
if(is_array($value)){ |