Skip to content

Instantly share code, notes, and snippets.

View hoginwang's full-sized avatar

KOP-SEE hoginwang

View GitHub Profile
@hoginwang
hoginwang / set-doh-template-win11.ps1
Created April 16, 2026 17:44
Set DOH template on Windows 11
$dnsProviders = @( `
`
@('Google', '8.8.8.8', 'https://dns.google/dns-query'), `
@('Google', '8.8.4.4', 'https://dns.google/dns-query'), `
@('Google', '2001:4860:4860::8888', 'https://dns.google/dns-query'), `
@('Google', '2001:4860:4860::8844', 'https://dns.google/dns-query'), `
@('Cloudflare', '1.1.1.1', 'https://cloudflare-dns.com/dns-query'), `
@('Cloudflare', '1.0.0.1', 'https://cloudflare-dns.com/dns-query'), `
@('Cloudflare', '2606:4700:4700::1111', 'https://cloudflare-dns.com/dns-query'), `
@('Cloudflare', '2606:4700:4700::1001', 'https://cloudflare-dns.com/dns-query'), `
// ==UserScript==
// @name 你可以拥有更好的搜索引擎
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author KOP-SEE
// @match https://www.baidu.com/*
// @match http://www.baidu.com/*
// @grant unsafeWindow
// @grant GM_getValue
@hoginwang
hoginwang / checkPhoneNumber.php
Last active January 21, 2021 21:54
PHP可接收短訊手提電話號碼校驗 Check a phone number whatever valid for accept SMS
<?php
function checkPhoneNumber($region,$number){
switch($region){
case '+86': //wiki:中国内地移动终端通讯号段
//Available (as of Jan 2021): 130, 131, 132, 133, 134 (except 134-9), 135, 136, 137, 138, 139, 150, 151, 152, 153, 155, 156, 157, 158, 159, 162, 165, 167, 166, 170, 171, 173, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, 197, 198, 199
$rule='/^1(?:3(?:(?:[0-3]|[5-9])\d{8}|4[0-8]\d{7})|4(?:5|7|9)\d{8}|5(?:[0-3]|[5-9])\d{8}|6(?:2|5-7)\d{8}|7(?:[0-3]|[5-8])\d{8}|8\d{9}|9(?:0-3|5-9)\d{8})$/';
$blacklist=array(
'13800138000','18918910000',
);
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0 auto;padding:0;}
html,body,input,textarea{font:14px/1.5 'Segoe UI','Microsoft YaHei','Microsoft JhengHei','Malgun Gothic',arial,sans-serif;}
body{max-width:568px;min-width:320px;text-align:center;}
img{border:none;}
a{color:#666;text-decoration:none;}
#main{width:100%;}
header section{display:-moz-box;display:-webkit-box;display:-ms-flexbox;height:45px;background:#00AAFF;color:#FFF;width:100%;}
header section a{display:inline-block;width:45px;height:100%;text-indent:-999em;background:#0099DD;background-image:url(http://p0.qhimg.com/d/inn/7ea2ae90/header.png);background-repeat:no-repeat;background-size:190px 24px;}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0 auto;padding:0;}
html,body,input,textarea{font:14px/1.5 'Segoe UI','Microsoft YaHei','Microsoft JhengHei','Malgun Gothic',arial,sans-serif;}
body{max-width:568px;min-width:320px;text-align:center;}
img{border:none;}
a{color:#666;text-decoration:none;}
#main{width:100%;}
header section{display:-moz-box;display:-webkit-box;display:-ms-flexbox;height:45px;background:#00AAFF;color:#FFF;width:100%;}
header section a{display:inline-block;width:45px;height:100%;text-indent:-999em;background:#0099DD;background-image:url(http://p0.qhimg.com/d/inn/7ea2ae90/header.png);background-repeat:no-repeat;background-size:190px 24px;}
body {text-align:center;}
#main{margin:20px auto 0;padding:4px;text-align:left;width:608px;height:608px;color:#fff;font:28px Segoe UI,Microsoft Yahei,Malgun Gothic;border:0px solid #00AAFF;background:linear-gradient(180deg, #00AAFF, royalblue);}
#title{font-size:36px;}
hr{height:0;border:0;border-top:3px solid;padding:0;margin:4px 0;}
#footer{position:relative;top:-1.8em;background:rgba(255,255,255,0.75);height:1.5em;line-height:1.2em;font:15px Malgun Gothic;text-shadow:0 0 px #FFF;color:royalblue;padding:0;margin:0;}