Skip to content

Instantly share code, notes, and snippets.

View jippi's full-sized avatar

Christian Winther jippi

View GitHub Profile
<?php
namespace nodes;
use \nodes\Log;
class Command {
public static function execute($command, $cwd = null, $env = null, $allowSudo = true) {
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
<?php
namespace nodes;
use \nodes\Log;
class Command {
public static function execute($command, $cwd = null, $env = null, $allowSudo = true) {
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
var refresh = 10000;
var period = 120;
var metrics =
[
{
"alias": " bytes",
"target": "stats_counts.logstash.pound.bytes"
},
{
"alias": "GET",
-> ./cake schema dump
Cake Schema Shell
---------------------------------------------------------------
Schema could not be loaded
LoadPlugin exec
<Plugin exec>
Exec "nobody:nogroup" "/etc/collectd/redis.sh"
</Plugin>
# -> ll redis.sh
# 4 -rwxr-xr-x 1 nobody nogroup 790 Jul 25 22:44 redis.sh
<?php
App::uses('CalendarDate', 'Lib');
/**
* Support class for working with recurring entries
*
*/
class RecurringSupport {
protected static $_modelName;
<?php
App::uses('CalendarDate', 'Lib');
/**
* Support class for working with recurring entries
*
*/
class RecurringSupport {
/**
<?php
App::uses('AppModel', 'Model');
/**
* Voucher Model
*
* @property VoucherClaim $VoucherClaim
* @property Place $Place
*/
class Voucher extends AppModel {
<?php
App::uses('CakeFixtureManager', 'TestSuite/Fixture');
App::uses('CakeTestFixture', 'TestSuite/Fixture');
App::uses('ConnectionManager', 'Model');
class NodesFixtureManager extends CakeFixtureManager {
public function loadAllFixtures($source, $fixtures) {
$this->_initDb($source);
$this->_loadFixtures($fixtures);
<?php
var_dump(json_encode(array()));
var_dump(json_encode(array(), JSON_FORCE_OBJECT));
var_dump(json_encode(array(array(1), array(2))));
var_dump(json_encode(array(array(1), array(2)), JSON_FORCE_OBJECT));
var_dump(json_encode(array('x' => array(1), array(2))));
var_dump(json_encode(array('x' => array(1), array(2)), JSON_FORCE_OBJECT));