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
#一键从备份恢复数据 | |
HOST=192.168.1.158 #主机地址,最好写好证书 | |
BACKUP_DIR=/data/autobackup/mysql #远程备份文件夹地址 | |
DB=jjdd #数据库名 | |
MYSQL_DATA_DIR=/usr/local/mysql/data/ #本机数据库 datadir | |
MYSQL_USER=_mysql:_mysql #mysql 的用户 | |
#start... | |
sudo echo '已获得 root 权限' | |
if [ $? -ne 0 ] ; 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
var proxy = "SOCKS5 127.0.0.1:1081; SOCKS 127.0.0.1:1081; DIRECT;"; | |
var direct = 'DIRECT;'; | |
var domains = [ | |
'twitter.com', | |
'google.com', | |
'google.com.hk', | |
't.co', | |
'twimg.com', | |
'github.com', |
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 | |
class upyun_form_upload { | |
private $policy = []; | |
private $secret_key; | |
function __construct($secret_key){ | |
$this->secret_key = $secret_key; | |
} | |
function __call($function_name, $params){ | |
$key = $this->underscore2hyphen($function_name); | |
if (!empty($params)) { |
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 | |
function createStr($num = 700, $len = 6){ | |
if($num===0){ | |
return []; | |
} | |
$numbers = range(0, 9); | |
$letters = range('a', 'z'); | |
$uppers = range('A', 'Z'); | |
$elements = array_merge($numbers, $letters, $uppers); | |
$strings = []; |
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
deny from 42.120.142.220/30 | |
deny from 42.120.145.0/24 | |
deny from 42.156.250.110/31 | |
deny from 42.156.250.112/29 | |
deny from 120.26.55.211/32 | |
deny from 121.40.83.80/32 | |
deny from 121.42.0.0/24 | |
#https://help.aliyun.com/knowledge_detail/5975223.html |
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
javascript:(function() { function R(a){ona = "on"+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R("contextmenu"); R("click"); R("mousedown"); R("mouseup"); R("selectstart");})() |
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 | |
define('GOAT', 0); | |
define('CAR', 1); | |
echo "尝试五次,每次1000遍,换门的中奖率\n"; | |
for($j=0;$j<5;$j++) { | |
$exchange = true; | |
simulation($exchange); | |
} |
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
package main | |
import "fmt" | |
import "strings" | |
import "math" | |
func main() { | |
fmt.Println(get_num("r9")) | |
fmt.Println(generate_code(840)) | |
} |
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 | |
class Page | |
{ | |
public static function Generate($page, $count, $perpage=50) | |
{ | |
$max = ceil($count / $perpage); | |
if($page > $max) { | |
$page = $max; | |
} else if($page < 1) { | |
$page = 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
<?php | |
$g = stream_context_create ([ | |
"ssl" => ["capture_peer_cert" => true], | |
'http' => [ | |
'method' => 'GET', | |
'user_agent' => 'shouwang.io ssl detector', | |
'timeout'=>10 | |
] | |
]); | |
$r = fopen("https://www.baidu.com/", "rb", false, $g); |