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 | |
class My_Controller_Plugin_ActionMapper extends Zend_Controller_Plugin_Abstract { | |
public function preDispatch() { | |
$request = $this->getRequest(); | |
list ($action, $format) = explode('.', $request->getActionName()); | |
if ($format) { | |
$request->setParam('format', $format); | |
$request->setParam('action', $action); |
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 | |
class FooController extends Zend_Controller_Action { | |
public function init() { | |
$ctx = $this->_helper->getHelper('AjaxContext'); | |
$ctx->addActionContext('render', 'html') | |
->initContext(); | |
} | |
public function renderAction() { |
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 | |
$def = new Zend_Controller_Router_Route( | |
':module/:controller/:action/*', | |
array( | |
'module' => 'public', | |
'controller' => 'index', | |
'action' => 'index' | |
) | |
); |
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 | |
class My_Plugin_Fubar extends Zend_Controller_Plugin_Abstract { | |
public function preDispatch(Zend_Controller_Request_Abstract $request) { | |
$front = Zend_Controller_Front::getInstance(); | |
$router = $front->getRouter(); | |
$assembled = $router->getCurrentRoute()->assemble(array( | |
'controller' => $request->getControllerName(), | |
'action' => $request->getActionName() | |
), true, null, 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
ntpdate -v -b in.pool.ntp.org |
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
( echo -e "HTTP/1.0 200 Ok\n\r"; tail -f error_log; ) | nc -lp 1234 |
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
dd if=/dev/zero bs=4096 count=1048576 | ssh [email protected] 'cat > /dev/null' |
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
# For documentation on format of this file go to: | |
# http://github.com/sitaramc/gitolite/blob/master/conf/example.conf | |
# Peytz | |
@peytz = jage-peytz jakr-peytz | |
# PZ | |
@pointzero = hema chmo thbr stof | |
# Admins |
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 'phpQuery/phpQuery.php'; | |
$prefix = 'http://fyrrum.dk/portal.php'; | |
$doc = phpQuery::newDocumentHTML(file_get_contents( | |
$prefix | |
)); | |
$captures = array(); |