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 |
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
<?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
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
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
<?php | |
class Endo_Filter_Typografic implements Zend_Filter_Interface | |
{ | |
public function filter($value) | |
{ | |
$value = preg_replace('/(\s([\w]{1})\s)/u', ' ${2} ', $value); | |
return $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
foldingStartMarker = '/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))|\/\*\s*@group\s*.*\s*\*\/'; | |
foldingStopMarker = '(?<!\*)\*\*/|^\s*\}|\/*\s*@end\s*.*\s*\*\/'; | |
/* @group ${1:name} */ | |
${0:$TM_SELECTED_TEXT} | |
/* @end ${1:name} */ |
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
PATH=/usr/local/bin:/usr/local/sbin:$PATH | |
source `brew --prefix`/Library/Contributions/brew_bash_completion.sh | |
export EDITOR=/usr/local/bin/mate | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export CLICOLOR=1 |
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
{ scopeName = 'source.css'; | |
comment = ''; | |
fileTypes = ( 'css', 'css.erb' ); | |
foldingStartMarker = '/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))|\/\*\s*@group\s*.*\s*\*\/'; | |
foldingStopMarker = '(?<!\*)\*\*/|^\s*\}|\/*\s*@end\s*.*\s*\*\/'; | |
patterns = ( | |
{ include = '#comment-block'; }, | |
{ include = '#selector'; }, | |
{ name = 'meta.at-rule.charset.css'; | |
begin = '\s*((@)charset\b)\s*'; |
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
/* @group ${1:name} */ | |
${0:$TM_SELECTED_TEXT} | |
/* @end ${1:name} */ |
OlderNewer