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 setPlacesAutocomplete(selector, value) { | |
casper.then(function () { | |
casper.sendKeys(selector, value, { keepFocus: true }); | |
casper.page.sendEvent('keydown', 0); | |
casper.page.sendEvent('keyup', 0); | |
}); | |
casper.waitUntilVisible('.pac-container .pac-item', function () { | |
casper.page.sendEvent('keydown', casper.page.event.key.Down); | |
casper.page.sendEvent('keydown', casper.page.event.key.Enter); | |
}); |
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\Client, | |
Everyman\Neo4j\Transport\Stream, | |
Everyman\Neo4j\Transport\Curl, | |
Everyman\Neo4j\Cypher\Query; | |
require_once 'example_bootstrap.php'; | |
$transport = new Stream(); | |
// $transport = new Curl(); |
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 session_serialize(array $data) { | |
$temp = $_SESSION; | |
$_SESSION = $data; | |
$out = session_encode(); | |
$_SESSION = $temp; | |
return $out; | |
} | |
function session_unserialize($data) { |
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
class base_node { | |
loggly::device { "application_log": } | |
loggly::device { "apache_access": } | |
loggly::device { "apache_error": } | |
} |
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
$.ajax("https://mydomain.loggly.com/api/facets/date/?q=my_search_criteria", { | |
// Don't send the _=timestamp query parameter | |
cache: true, | |
// Send HTTP auth credentials | |
username: api_readonly_username, | |
password: api_readonly_password, | |
// Use JSONP | |
dataType: "jsonp" | |
}).done(function(data) { | |
// handle data, probably a call to some graphing library |
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 | |
// index.php | |
$app->get('/{id}', function ($id) use ($app) { | |
$controller = new Lal\HelloController(); | |
return $controller->helloId($id); | |
}); | |
$app->get('/', function () use ($app) { | |
$controller = new Lal\HelloController(); | |
return $controller->index(); | |
}); |
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 | |
error_reporting(-1); | |
ini_set('display_errors', 1); | |
spl_autoload_register(function ($sClass) { | |
$sLibPath = __DIR__.'/../lib/'; | |
$sClassFile = str_replace('\\',DIRECTORY_SEPARATOR,$sClass).'.php'; | |
$sClassPath = $sLibPath.$sClassFile; | |
if (file_exists($sClassPath)) { | |
require($sClassPath); | |
} |
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
sudo sh -c 'ls -hal /root/ > /root/test.out' |
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 | |
$client = new Everyman\Neo4j\Client(); | |
$queryString = | |
"START firstPerson=node({firstId}), secondPerson=node({secondId}) " . | |
"MATCH firstPerson -[:FRIEND]-> mutualFriend <-[:FRIEND]- secondPerson" . | |
"RETURN mutualFriend"; | |
$params = array( | |
"firstId" => 123, |
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 | |
interface Command | |
{ | |
public static function register(); | |
public function execute(); | |
} | |
class HelloCommand implements Command { | |
protected $name; |
NewerOlder