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
gsed -ni '/PATTERN_START/{p; :a; N; /PATTERN_END/!ba; s/.*\n//g}; p' <input_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
function test(){ | |
echo -n "Testing configuration. Please wait..." | |
sleep 5 | |
while true | |
do | |
echo -n "." | |
sleep 10 | |
done | |
} |
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 | |
if(extension_loaded('xhprof')) { | |
$utilsPath = '/usr/share/php5-xhprof/xhprof_lib/utils/'; | |
include_once $utilsPath . 'xhprof_lib.php'; | |
include_once $utilsPath . 'xhprof_runs.php'; | |
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); |
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 | |
/** | |
* @author dweingart at pobox dot com | |
* | |
* If you want to Curl to follow redirects | |
* and you would also like Curl to echo back | |
* any cookies that are set in the process, | |
* use this: | |
*/ |
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
SELECT name, COUNT(*) c FROM table GROUP BY name HAVING c > 1; |