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); | |
} |
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
#!/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
<?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 | |
# 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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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: https://github.com/xdebug/xdebug/releases | |
cd ./xdebug | |
/usr/local/php71/bin/phpize | |
./configure --enable-xdebug --with-php-config=/usr/local/php71/bin/php-config |
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
cd ./apache24 | |
make distclean | |
./configure \ | |
--prefix=/usr/local/apache2 \ | |
--enable-pie \ | |
--enable-modules=all \ | |
--enable-mods-shared=all \ | |
--enable-authn-dbm \ | |
--enable-authn-anon \ | |
--enable-authn-dbd \ |
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 | |
rm -f /usr/local/bin/pear | |
rm -f /usr/local/bin/peardev | |
rm -f /usr/local/bin/pecl | |
rm -f /usr/local/bin/phar | |
rm -f /usr/local/bin/phar.phar | |
rm -f /usr/local/bin/php | |
rm -f /usr/local/bin/php-cgi | |
rm -f /usr/local/bin/php-config |
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
SELECT a.term_id | |
, a.name | |
, a.slug | |
, b.count | |
FROM wp_terms a | |
LEFT JOIN wp_term_taxonomy b | |
ON a.term_id = b.term_id | |
WHERE b.taxonomy = 'category'; |
OlderNewer