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
#!/bin/bash | |
MAXIMUM_BACKUP_FILES=10 #最大备份文件数 | |
BACKUP_FOLDERNAME="/var/db/backup/" #数据库备份文件的主目录 | |
DB_HOSTNAME="localhost" #mysql所在主机的主机名 | |
DB_USERNAME="backupaccount" #mysql登录用户名 | |
DB_PASSWORD="backuppassword" #mysql登录密码 | |
DATABASES=( | |
"dbname" #备份的数据库名 | |
) |
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
#!/usr/bin/env bash | |
# 模拟单个mapper和reducer | |
SORT='-k1,1' | |
if [ $# -lt 2 ] ; then | |
echo "USAGE:" | |
echo " $0 inputfile mapper"; #双参数 | |
echo " $0 inputfile mapper reducer ";#三参数 | |
echo " $0 inputfile mapper reducer SORT_ARGS";#多参数 | |
echo " -default [SORT_ARGS]: '$SORT'"; |
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
var YYF_CONSOLE = { | |
_console: function(method) { | |
return function() { | |
setTimeout(console[method].bind.apply(console[method], [console].concat(Array.prototype.slice.call(arguments)))); | |
} | |
} | |
}; | |
['assert','clear','count','debug','dir','dirxml','error','group','groupCollapsed','groupEnd','info','log','profile','profileEnd','time','timeEnd','timeStamp','warn'].forEach(function(method) { | |
YYF_CONSOLE[method] = YYF_CONSOLE._console(method); |
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
{ | |
"repositories": [ | |
{ | |
"url": "https://github.com/YunYinORG/YYF.git", | |
"path": "/var/www/YYF", | |
"cmd": "git pull && service httpd restart", | |
"branch": "master" | |
}, | |
{ | |
"url": "https://github.com/YunYinORG/YYF.git", |
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
curl -so /dev/null -w 'DNS:%{time_namelookup}\tConnect:%{time_connect}\tStart:%{time_starttransfer}\tTotal:%{time_total}\tSpeed:%{speed_download} byte/s\n' https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ | |
curl -so /dev/null -w 'DNS:%{time_namelookup}\tConnect:%{time_connect}\tStart:%{time_starttransfer}\tTotal:%{time_total}\tSpeed:%{speed_download} byte/s\n' https://ipv6.mirrors.ustc.edu.cn/ubuntu/ |
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_PATH=${PHP_PATH:=php} | |
#get php version | |
#获取 php 版本 | |
PHP_VERSION=$("$PHP_PATH" -v|grep --only-matching --perl-regexp "\d\.\d+\.\d+"|head -1); | |
php -v|grep -oP "(?<=^PHP\W)\d\.\d\.\d+" | |
#get php.ini path | |
#获取 php.in 位置 | |
PHP_INI=$("$PHP_PATH" --ini|grep --only-matching --perl-regexp "/.*php.ini$"|head -1) | |
#php.ini for all | |
PHP_INI=$("$PHP_PATH" --ini|grep --only-matching --perl-regexp "/.*php.ini$"|head -1|sed -r -e 's/cli/*/') |
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 | |
// Initial Configuration | |
global $aHash; | |
$i = 0; | |
$tmp = ''; | |
while($i < 100) { | |
$tmp .= 'a'; | |
++$i; | |
} |
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
application.directory=APP_PATH "/app/" | |
application.ext="php" | |
application.view.ext="phtml" | |
application.modules="index" | |
application.library.directory = APP_PATH "/library" | |
application.library.namespace="" | |
application.bootstrap=APP_PATH "/library/Bootstrap" | |
application.baseUri="" | |
application.dispatcher.defaultRoute="" | |
application.dispatcher.throwException=1 |
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
#!/bin/sh | |
# Remove Postfix | |
systemctl stop postfix | |
systemctl disable postfix | |
yum remove -y postfix | |
# Remove Linux headers | |
yum -y remove *firmware avahi-autoipd avahi-libs avahi bluez-utils kudzu alsa-lib fxload rdma man-db microcode_ctl NetworkManager-team | |
yum clean all |
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
#!/bin/bash | |
#tools | |
# sudo yum install wget | |
# sudo yum install net-tools | |
# sudo yum install vim | |
#update source | |
# sudo yum install -y wget |