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
var till = "awesome"; | |
var mathias = "win"; |
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 | |
require_once 'HTTP/Request2.php'; | |
class ArmChair extends HTTP_Request2 | |
{ | |
protected $server; | |
public function __construct($server) | |
{ | |
$this->server = $server; | |
parent::__construct($server); |
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
#! /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 |
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; | |
} | |
} | |
} |
OlderNewer