Skip to content

Instantly share code, notes, and snippets.

@till
till / gist:223136
Created October 31, 2009 16:18 — forked from janl/gist:223077
var till = "awesome";
var mathias = "win";
<?php
require_once 'HTTP/Request2.php';
class ArmChair extends HTTP_Request2
{
protected $server;
public function __construct($server)
{
$this->server = $server;
parent::__construct($server);
<?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.
<?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";
}
#! /bin/sh
### BEGIN INIT INFO
# Provides: YOURPROJECT
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts YOURPROJECT
# Description: starts YOURPROJECT using start-stop-daemon
<?php
Queue_QueueController extends Zend_Controller_Action
{
protected $workers = array();
public function gearmanworkerAction()
{
set_error_handler("queueErrorHandler");
$this->setNoRender(true);
[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"
/*
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];
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
/*
inside the view
*/
if (typeof doc.settings != undefined) {
if (typeof doc.settings.research != undefined) {
if (doc.settings.research == 'disallow') {
return;
}
}
}