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 | |
// initialize the JadedPHP library here | |
class MyController extends Jaded_Controller | |
{ | |
protected function process(Jaded_Request $oRequest, Jaded_Response $oResponse) | |
{ | |
$oResponse->assign('myVar', 'this is the assigned value'); | |
$oResponse->assign('requestVar', $oRequest->getParam('reqParam')); | |
} |
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
RewriteEngine on | |
# look for URLS like 'subdir.username.foo.bar' | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteCond %{HTTP_HOST} ([^.]+)\.([^.]+)\.foo\.bar$ | |
RewriteCond /home/%2/public_html/%1 -d | |
RewriteRule ^(.+) %{HTTP_HOST}$1 [C] | |
RewriteRule ([^.]+)\.([^.]+)\.foo\.bar(?::\d+)?(.*) /home/$2/public_html/$1$3 [L] | |
# look for URLS liks 'username.foo.bar' | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ |
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
# Assuming an instance tagged with Foo=bar | |
# Using the aws-tools | |
ec2-describe-tags --filter key=Foo value=bar | cut -f3 |
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
#!/bin/bash | |
# | |
# Bash must have been compiled with this ability: --enable-net-redirections | |
# The device files below do not actually exist. | |
# Use /dev/udp for UDP sockets | |
exec 3<>/dev/tcp/host/port | |
# Write to the socket as with any file descriptor | |
echo "Write this to the socket" >&3 |
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 php | |
<?php | |
use Everyman\Neo4j\Transport, | |
Everyman\Neo4j\Client, | |
Everyman\Neo4j\Batch, | |
Everyman\Neo4j\Relationship, | |
Everyman\Neo4j\Node; | |
error_reporting(-1); | |
ini_set('display_errors', 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
#!/usr/bin/env php | |
<?php | |
namespace Everyman\Neo4j; | |
use Everyman\Neo4j\Transport, | |
Everyman\Neo4j\Client, | |
Everyman\Neo4j\Batch, | |
Everyman\Neo4j\Relationship, | |
Everyman\Neo4j\Node; | |
error_reporting(-1); | |
ini_set('display_errors', 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 | |
echo "\nCopy-on-write:\n"; | |
$a = array(array("result" => "a")); | |
for ($i=0; $i < 2; $i++) { | |
foreach ($a as $j => $v) { | |
$v["result"] .= "a"; | |
echo $v["result"] ."\n"; | |
} | |
} |
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
// CareLink Linux | |
// version 0.0 | |
// | |
//-------------------------------------------------- | |
// | |
// This script allows users of Chrome on Linux to | |
// access the Minimed CareLink site at | |
// http://carelink.minimed.com | |
// | |
//-------------------------------------------------- |
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 | |
use Everyman\Neo4j\Node, | |
Everyman\Neo4j\Index; | |
class Actor | |
{ | |
public $id = null; | |
public $name = ''; | |
protected $node = null; |
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 php | |
<?php | |
use Everyman\Neo4j\Transport, | |
Everyman\Neo4j\Client, | |
Everyman\Neo4j\Index, | |
Everyman\Neo4j\Relationship, | |
Everyman\Neo4j\Node; | |
error_reporting(-1); | |
ini_set('display_errors', 1); |
OlderNewer