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
function isAjax() { | |
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) | |
&& $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false; | |
} |
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
runCallbacks = function (type, property, key, value) { | |
var i, j, callbacks = propertyMap[property][type]; | |
for (i = 0, j = callbacks.length; i < j; i += 1) { | |
(function(callbacks, i, key, value) { | |
window.setTimeout(function () { | |
callbacks[i](key, value); | |
}, 0); | |
})(callbacks, i, key, value); | |
} | |
}, |
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 | |
class Endo_Controller_Plugin_Modular extends Zend_Controller_Plugin_Abstract | |
{ | |
public function preDispatch(Zend_Controller_Request_Abstract $request) | |
{ | |
$module = $request->getModuleName(); | |
$module = empty($module) ? 'frontend' : $request->getModuleName(); | |
$namespace = Zend_Auth_Storage_Session::NAMESPACE_DEFAULT; | |
$member = Zend_Auth_Storage_Session::MEMBER_DEFAULT | |
. '-' . $module; |
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 | |
$dump = '/...'; | |
$date = date('Ymd'); | |
$version = 1; | |
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dump)) as $file) { | |
if (preg_match('/^'.$date.'/', $file->getFilename())) { | |
$version++; | |
} | |
} | |
$version = substr('000', 0, -(strlen($version))) . $version; |
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
while [ 1 ]; do ps aux | grep --exclude=grep php-cgi | grep -v grep | awk 'BEGIN{s=0;}{s=s+$6;}END{print s/1024.2;}'; sleep 2; done |
NewerOlder