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 ArrToXml($arr) | |
{ | |
if(!is_array($arr) || count($arr) == 0) return ''; | |
$xml = "<xml>"; | |
foreach ($arr as $key=>$val) | |
{ | |
if (is_numeric($val)){ | |
$xml.="<".$key.">".$val."</".$key.">"; | |
}else{ |
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
if ($remote_addr !~ ^(100.110.15.16|100.110.15.17|100.110.15.18|127.0.0.1)) { | |
return 403; | |
} |
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
/* $ javac CommandLine.java | |
$ java CommandLine this is a command line 200 -100 */ | |
public class CommandLine | |
{ | |
public static void main(String[] args) | |
{ | |
int len = args.length; | |
for ( int i = 0; i < len; 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
import java.util.*; | |
public class DiffDemo | |
{ | |
public static void main(String[] args) | |
{ | |
try | |
{ | |
long start = System.currentTimeMillis(); |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here] | |
@="在此处打开命令行" | |
"Icon"="cmd.exe" | |
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 | |
/* Git WebHook 自动更新代码 */ | |
/* 成功条件:1. php 的运行用户(一般是www-data)需要 sudo 免密码 2. git 需要记住密码 */ | |
define( 'PASSWORD', '123456' ); | |
$requestBody = file_get_contents( "php://input" ); | |
$content = json_decode( $requestBody, true ); | |
/* 验证密码 */ |
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 | |
/** | |
* Decode a string with URL-safe Base64. | |
* | |
* @param string $input A Base64 encoded string | |
* | |
* @return string A decoded string | |
*/ | |
function urlsafeB64Decode($input) |
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
<meta charset="UTF-8"/> | |
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=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
cd /etc/apt/ | |
cp sources.list sources.list.bak | |
# 替换以下文件 # | |
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse | |
##测试版源 |
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
location ~ .*\.(js|css|png|jpg)$ { | |
proxy_pass http://47.93.35.223:8081; | |
} |
NewerOlder