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
#!/bin/bash | |
# Source: http://www.php.net/ | |
cd ./php71 | |
./configure \ | |
\ | |
--prefix=/usr/local/php71 \ | |
\ | |
--with-apxs2=/usr/local/apache2/bin/apxs \ |
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 | |
// 置換元と置換先のマップは配列で用意 | |
$search = array("が","ぎ","ぐ","げ","ご","ざ","じ","ず","ぜ","ぞ","だ","ぢ","づ","で","ど","ば","び","ぶ","べ","ぼ","ぱ","ぴ","ぷ","ぺ","ぽ","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ"); | |
$replace = array("が","ぎ","ぐ","げ","ご","ざ","じ","ず","ぜ","ぞ","だ","ぢ","づ","で","ど","ば","び","ぶ","べ","ぼ","ぱ","ぴ","ぷ","ぺ","ぽ","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ"); | |
// 引数が適正かをチェック | |
if ($argc > 1 and !empty($argv[1]) and is_dir($argv[1]) and is_writable($argv[1])) { | |
// 引数値を正規化 | |
$dirpath = str_replace('//', '/', trim($argv[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
#!/bin/bash | |
function apache() { | |
case "$1" in | |
"start" | "stop") | |
sudo /usr/sbin/apachectl $1; | |
;; | |
"status" ) | |
apachestat=`ps -efww|grep "httpd"|grep -v grep|wc -l`; | |
if [ ${apachestat} -gt 0 ]; then |
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
#!/bin/bash | |
# Pre-check | |
if [ -f ./group.list ]; | |
then | |
echo "[SUCCESS] ./group.list is found" | |
else | |
echo "[ERROR] ./group.list file is not found."; | |
exit 1; | |
fi |
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 | |
if ($argc != 2 or empty($argv[1])) { | |
echo "Usage : $argv[0] {CHECK TARGET}\n"; | |
echo "Example: $argv[0] http://www.example.com/wp/xmlrpc.php\n"; | |
exit(1); | |
} elseif (!preg_match("/^(http|https):\/\//",$argv[1])) { | |
echo "Invalid URL\n"; | |
exit(1); | |
} |
NewerOlder