This file contains hidden or 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
[root@phoenix ~]# puppet agent --no-daemonize --verbose | |
notice: Starting Puppet client version 2.7.9 | |
err: Could not retrieve catalog from remote server: certificate verify failed. This is often because the time is out of sync on the server or client | |
info: Not using expired catalog for phoenix from cache; expired at Tue Mar 13 19:26:10 +0000 2012 | |
notice: Using cached catalog | |
err: Could not retrieve catalog; skipping run | |
err: Could not send report: certificate verify failed. This is often because the time is out of sync on the server or client |
This file contains hidden or 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
[epel] | |
name=Extra Packages for Enterprise Linux 5 - $basearch | |
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch | |
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch | |
failovermethod=priority | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL | |
[epel-debuginfo] |
This file contains hidden or 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 | |
$input = 'some stuff <?= $this->foo ?> blah'; | |
echo $input."\n"; | |
echo preg_replace('/\<\?=\s*\$this->(.+?)\s*;?\s*\?>/msx', '<?php echo $this->$1; ?>', $input)."\n"; | |
// Should output: | |
some stuff <?= $this->foo ?> blah | |
some stuff <?php echo $this->foo; ?> blah | |
?> |
This file contains hidden or 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
News::applyFilter('find', function($self, $params, $chain) { | |
$result = $chain->next($self, $params, $chain); | |
$function = function($item) { | |
$item->content = nl2br(htmlspecialchars($item->content, ENT_QUOTES, 'UTF-8')); | |
$item->date_updated_pretty_date = date('j F Y', strtotime($item->date_updated)); | |
$item->date_updated_pretty_time = date('H:i', strtotime($item->date_updated)); | |
$item->date_created = date('F jS, Y', strtotime($item->date_created)); | |
$item->date_updated = date('F jS, Y', strtotime($item->date_updated)); | |
$item->dealer_groups = explode(';', $item->dealer_groups); |
This file contains hidden or 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
$map = 'function() { | |
this.forms.forEach(function(form){ | |
form.clusters.forEach(function(cluster){ | |
cluster.items.forEach(function(item){ | |
emit(item, item); | |
}) | |
}) | |
}) | |
}'; |
This file contains hidden or 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
db.tests.remove({slug: "foo"}) | |
db.tests.insert({slug: "foo", forms: [ {slug: "section 1", clusters: [ | |
{slug: "cluster 1", items: [1,2,3]}, | |
{slug: "cluster 2", items: [4,5,6]} | |
]}]}); | |
var map = function() { | |
this.forms.forEach(function(form){ | |
form.clusters.forEach(function(cluster){ | |
cluster.items.forEach(function(item){ |
This file contains hidden or 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
$test = Test::create(); | |
$form1 = new Form(array('name' => 'Form 1')); | |
$form2 = new Form(array('name' => 'Form 2')); | |
$form3 = new Form(array('name' => 'Form 3')); | |
$test->forms = array($form1,$form2,$form3); | |
$test->save(); |
This file contains hidden or 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
lasterror() { | |
logpath=/usr/local/www-conf/logs/$1-phplog; | |
error=(${(f)$(awk -F: '/PHP Fatal error|\[error\]/ { lines[last] = NR } END { print lines[last] }' $logpath)}); | |
[[ -n $error ]] && tail -n +$error $logpath | |
} |
This file contains hidden or 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
static::applyFilter('find', function($self, $params, $chain) { | |
// Check if we're finding forms linked to a test | |
if (isset($params['options']['conditions']['test_id'])) { | |
$test_id = (int)$params['options']['conditions']['test_id']; | |
$params['options']['joins'] = array(new Query(array( | |
'source' => 'test_forms', | |
'constraint' => array ('Form.id' => 'test_forms.form_id', 'test_forms.test_id' => $test_id), | |
))); | |
unset($params['options']['conditions']['test_id']); | |
} |
This file contains hidden or 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
✘ test_cache_assets | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 |