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 | |
$debug_backtrace = debug_backtrace(); | |
$output = []; | |
foreach ($debug_backtrace as $debug) { | |
if (isset($debug['class'])) { | |
$o = $debug['class']; | |
} | |
$o .= '::' . $debug['function']; | |
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 | |
function shelli($command){ | |
$ouput = []; | |
$return = ''; | |
exec($command, $output, $return); | |
echo "<hr><hr>\n"; | |
echo "Executing \"$command\" with return value \"$return\".\n"; | |
echo "<hr><pre>\n" . implode($output, "\n") . "</pre><hr><hr>\n"; | |
} |
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 | |
protected function translate( $key, $arguments = array()) { | |
$extensionName = $this->request->getControllerExtensionName(); | |
return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, $extensionName, $arguments); | |
} |
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 | |
$tempFile = tmpfile(); | |
$tempFileMetaData = stream_get_meta_data( $tempFile ); | |
fwrite($tempFile, $string); | |
// path of the temp file | |
$tempFileMetaData['uri']; | |
// deletes the tmp file |
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
apache_setenv('downgrade-1.0','true'); | |
apache_setenv('force-response-1.0','true'); | |
ini_set('output_buffering', 'off'); | |
while( @ob_end_flush() ); | |
ini_set('implicit_flush', true); | |
flush(); | |
echo "sending"; | |
flush(); |
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
function escapeHtml(text) { | |
var map = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
"'": ''' | |
}; | |
return text.replace(/[&<>"']/g, function(m) { return map[m]; }); |
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
- | |
requestFilter: 'parentRequest.isPackage("My.Package") && isSubPackage("ViewHelpers\Widget") && isController("Paginate")' | |
options: | |
templatePathAndFilename: | |
'resource://My.Package/Private/Templates/ViewHelpers/Widget/Paginate/Index.html' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
public function initializeNewAction() { | |
if( !$this->request->hasArgument('newObject') && $this->request->getHttpRequest()->hasArgument('newObject') ) { | |
$this->request->setArgument('newObject', $this->request->getHttpRequest()->getArgument('newObject')); | |
} | |
} |
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 small servers | |
default['apache']['timeout'] = 30 | |
default['apache']['keepaliverequests'] = 10 | |
default['apache']['keepalivetimeout'] = 5 | |
# only for prefork | |
default['apache']['prefork']['startservers'] = 3 | |
default['apache']['prefork']['minspareservers'] = 3 | |
default['apache']['prefork']['maxspareservers'] = 5 | |
default['apache']['prefork']['maxrequestworkers'] = 10 | |
default['apache']['prefork']['maxconnectionsperchild'] = 0 |
OlderNewer