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 | |
# Shell script to backup MySql database. | |
# Usage: dbbackup db_name / dbbackup "db_name1 db_name2 db_name3" | |
# -------------------------------------------------------------------- | |
MyUSER="user" # USERNAME | |
MyPASS="pwd" # PASSWORD | |
MyHOST="localhost" # HOSTNAME | |
# Backup Dest directory, change this if you have someother location |
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 | |
$ip_ads = array( | |
array(16777472, 16778239), | |
array(16779264, 16781311), | |
array(16785408, 16793599), | |
array(16842752, 16843007), | |
array(16843264, 16859135), | |
array(16908288, 16909055), | |
array(16909312, 16910335), | |
array(16910592, 16941055), |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<textarea id="css" style="margin: 2px; width: 400px; height: 429px;"></textarea> | |
<textarea id="rules" style="margin: 2px; width: 400px; height: 429px;"></textarea> | |
<button id="submit">submit</button> |
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 ip2long(IP) { | |
var i = 0; | |
IP = IP.match(/^([1-9]\d*|0[0-7]*|0x[\da-f]+)(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?$/i); | |
if (!IP) { | |
return false; | |
} | |
IP[0] = 0; | |
for (i = 1; i < 5; i += 1) { | |
IP[0] += !!((IP[i] || '').length); | |
IP[i] = parseInt(IP[i]) || 0; |
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 | |
yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel pkgconfig perl-libwww-perl perl-XML-Parser curl curl-devel libevent-devel libevent libidn-devel zlib-devel | |
yum -y update | |
cd /root | |
wget https://downloads.sourceforge.net/project/transmissionbt/intltool-0.40.6.tar.gz | |
wget https://downloads.sourceforge.net/project/transmissionbt/libevent-2.0.14-stable.tar.gz | |
wget https://transmission.cachefly.net/transmission-2.84.tar.xz |
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
--- a/ngx_http_autoindex_module.c Tue Aug 5 19:18:36 2014 | |
+++ b/ngx_http_autoindex_module.c Wed Aug 20 14:17:28 2014 | |
@@ -40,13 +40,12 @@ | |
ngx_flag_t enable; | |
ngx_flag_t localtime; | |
ngx_flag_t exact_size; | |
+ ngx_uint_t name_length; | |
} ngx_http_autoindex_loc_conf_t; | |
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 | |
# Get argument | |
getopts :c: opt && CONFIG=$OPTARG | |
getopts :i: opt && IGNORE=$OPTARG | |
# Check argument | |
[ -z $CONFIG ] || [ -z $IGNORE ] && { | |
echo "Missing argument" | |
exit 128 |
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 | |
DELAY=5 | |
PID_FILE=/tmp/systatus.pid | |
OUT_FILE=/tmp/systatus.json | |
RX_FILE=/sys/class/net/eth0/statistics/rx_bytes | |
TX_FILE=/sys/class/net/eth0/statistics/tx_bytes | |
TEMP_FILE=/sys/class/thermal/thermal_zone0/temp | |
if [ "stop" = "$1" ]; then |
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
iptab_r() { | |
local LOCAL_IP BODY | |
LOCAL_IP=$(uci get network.lan.ipaddr 2>/dev/null) | |
BODY=$(echo -e "$IPLIST" | \ | |
awk '$1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/ \ | |
{printf("-A SHADOWSOCKS -d %s -j RETURN\n", $1)}') | |
iptables-restore -n <<-EOF | |
*nat | |
:SHADOWSOCKS - [0:0] |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CIDR Match</title> | |
</head> | |
<body> | |
<table> | |
<tbody> | |
<tr> |
OlderNewer