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
-- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: dnsdata | |
-- ------------------------------------------------------ | |
-- Server version 5.1.61 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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
; 找到其中 | |
disable_functions = | |
; 替换为 | |
disable_functions = fsockopen,pfsockopen,chgrp,chown,chroot,closelog,dl,exec,ini_alter,ini_restore,openlog,passthru,popen,popepassthru,posix_kill,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,putenv,readlink,scandir,shell_exec,stream_socket_server,symlink,sys_getloadavg,syslog,system,virtual |
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
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ | |
-Dcom.sun.management.jmxremote.ssl=false \ | |
-Dcom.sun.management.jmxremote.authenticate=false" |
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
<? | |
/** | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
#!/usr/bin/env python | |
#coding:utf-8 | |
'''Compress js and css file. | |
usage: | |
compjscss.py dir | |
will compress all css/js in dir and save to dir_min/ | |
''' | |
import requests |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# (c) 2014, itxx00 <[email protected]> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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 | |
# | |
sync && sync | |
case $1 in | |
select) | |
echo 3 > /proc/sys/vm/drop_caches | |
mysqlslap --no-defaults --concurrency=50 --engine=innodb --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=key --auto-generate-sql-write-number=100000 --number-of-queries=300000 | |
echo 3 > /proc/sys/vm/drop_caches | |
;; | |
insert) |
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 | |
# manage /etc/hosts | |
isIp() { | |
# test variable is an ip address or not | |
# true: return 0 | |
# false: return 1 | |
local ip=$1 | |
local stat=1 | |
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then | |
OIFS=$IFS |
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/sh | |
[ -z $1 ] || dig +nocmd +noall +answer +stats $@ | grep 'IN\|Query time' | sed 's/;; Query time://' | sed ';N;s/\n//' |
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 | |
# A simple script to protect system from DOS attack | |
# create a crontab conf file /etc/cron.d/autoban like this: | |
# * * * * * root /sbin/autoban.sh ban >/dev/null 2>&1 & | |
# */10 * * * * root /sbin/autoban.sh unban - 5 >/dev/null 2>&1 & | |
# 01 * * * * root /sbin/autoban.sh unban 6 20 >/dev/null 2>&1 & | |
# 01 09 * * * root /sbin/autoban.sh unban 21 - >/dev/null 2>&1 & | |
# | |
PATH=/bin:/usr/bin:/usr/sbin:/sbin | |
export PATH |