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
$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
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
$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
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
<?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
[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
[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
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Extra content at the end of the document in user/plugins/tests/tests.plugin.php line 64 | |
user/plugins/tests/tests.plugin.php line 64: | |
SimpleXMLElement->__construct( …1 arg… ) | |
[core] line 0: | |
TestsPlugin->action_admin_theme_get_tests( …1 args… ) | |
system/classes/plugins.php line 80: | |
call_user_func_array( …1 args… ) | |
system/handlers/adminhandler.php line 143: | |
Plugins::act( …1 args… ) | |
system/handlers/actionhandler.php line 68: |
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
<head> | |
<title><?php Options::out( 'title' ); ?></title> | |
<meta charset="utf-8" /> | |
<meta name="generator" content="Habari"> | |
<!--[if IE]> | |
<script src="<?php Site::out_url( 'theme' ); ?>/html5.js"></script> | |
<![endif]--> | |
<?php Stack::add('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery');?> |