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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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 | |
abstract class MyController extends Zend_Controller_Action | |
{ | |
public function render($view) | |
{ | |
if (strstr($view, '/')) { | |
$file = $view . '.phtml'; | |
} else { | |
$file = $this->getRequest()->getControllerName() . "/{$view}.phtml"; | |
} |
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 | |
Queue_QueueController extends Zend_Controller_Action | |
{ | |
protected $workers = array(); | |
public function gearmanworkerAction() | |
{ | |
set_error_handler("queueErrorHandler"); | |
$this->setNoRender(true); |
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
[Fri, 27 Aug 2010 16:47:21 +0000] DEBUG: Processing remote_file[/usr/local/bin/build-ebs-raid] | |
[Fri, 27 Aug 2010 16:47:21 +0000] DEBUG: remote_file[/usr/local/bin/build-ebs-raid] using Chef::Provider::RemoteFile | |
[Fri, 27 Aug 2010 16:47:21 +0000] DEBUG: Checking remote_file[/usr/local/bin/build-ebs-raid] for changes | |
[Fri, 27 Aug 2010 16:47:21 +0000] DEBUG: Preferred remote_file list: {"/root/scalarium-agent/site-cookbooks/easybib-solr/files/default/solr.logrotate"=>{:file=>"/root/scalarium-agent/site-cookbooks/easybib-solr/files/default/solr.logrotate", :singlecopy=>"default", :name=>"solr.logrotate"}, "/root/scalarium-agent/site-cookbooks/easybib-solr"=>{:file=>"/root/scalarium-agent/site-cookbooks/easybib-solr", :singlecopy=>nil, :name=>"easybib-solr"}, "/root/scalarium-agent/site-cookbooks/easybib-solr/files/default"=>{:file=>"/root/scalarium-agent/site-cookbooks/easybib-solr/files/default", :singlecopy=>nil, :name=>"default"}, "/root/scalarium-agent/site-cookbooks/easybib-solr/files/default/config.rb-dist" |
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
/* | |
save the following file as 'array.js' and run with: node array.js | |
*/ | |
sys = require('sys'); | |
Array.prototype.foo = function () { return 'foo'; } | |
Array.prototype.bar = function () { return 'bar'; } | |
var testArray = [1, 2, 3, 4, 5]; |
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
till@till-laptop:~/node-logmaster$ node server.js | |
/var/log/syslog | |
/var/log/php.log | |
/var/log/nginx/error_log | |
No such file: /var/log/php.log | |
No such file: /var/log/nginx/error_log | |
Sep 1 10:47:12 till-laptop wpa_supplicant[979]: WPS-AP-AVAILABLE | |
Sep 1 10:47:12 till-laptop wpa_supplicant[979]: Trying to associate with 00:18:84:88:3a:78 (SSID='MyPlace' freq=2422 MHz) | |
Sep 1 10:47:12 till-laptop NetworkManager: <info> (wlan0): supplicant connection state: scanning -> associating | |
Sep 1 10:47:12 till-laptop wpa_supplicant[979]: Associated with 00:18:84:88:3a:78 |
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
/* | |
inside the view | |
*/ | |
if (typeof doc.settings != undefined) { | |
if (typeof doc.settings.research != undefined) { | |
if (doc.settings.research == 'disallow') { | |
return; | |
} | |
} | |
} |
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
<script type="text/javascript"> | |
/* <![CDATA[ */ | |
jQuery(document).ready(function(){ | |
jQuery.noConflict(); | |
var jq = jQuery; | |
jq.ajax({ | |
url: '/rss', | |
type: 'GET', | |
dataType: 'xml', | |
error: function (xhr, status, e) { |
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 | |
// ... | |
if (!$memcached->connect($_Auth_OpenID_memcache_test_host)) { | |
print "(skipping memcache store tests - couldn't connect)"; | |
$this->pass(); | |
} |
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
this_dir = File.dirname(__FILE__) | |
chef_dir = "#{this_dir}/chef-solo" | |
if !File.exist?(chef_dir) then | |
Dir.mkdir(chef_dir) | |
end | |
file_cache_path "#{chef_dir}" | |
cookbook_path [ "#{chef_dir}/cookbooks" ] | |
role_path "#{chef_dir}/roles" |