本文主要是教你怎么定制一下自己的ACL或者clash规则。
前面稍微科普一下去广告的分类、不作为重点。
本文不能顾及全网的规则,仅做一般普及,需要有点基础,非小白科普文章
| a n. 字母A;第一流的;学业成绩达最高标准的评价符号 abbr. [物]安(ampere) | |
| abandon n. 放任;狂热 vt. 遗弃;放弃 | |
| abbreviation n. 缩写;缩写词 | |
| ability n. 能力,能耐;才能 | |
| able adj. 能;[经管] 有能力的;能干的 n. (Able)人名;(伊朗)阿布勒;(英)埃布尔 | |
| abnormal adj. 反常的,不规则的;变态的 | |
| aboard prep. 在…上 adv. 在飞机上;[船] 在船上;在火车上 | |
| abolish vt. 废除,废止;取消,革除 | |
| abortion n. 流产,堕胎,小产;流产的胎儿;(计划等)失败,夭折 | |
| about prep. 关于;大约 n. 大致;粗枝大叶;不拘小节的人 adj. 在附近的;四处走动的;在起作用的 adv. 大约;周围;到处 n. (About)人名;(法)阿布 |
| # 判断闰年平年 | |
| cal_days_in_year() { | |
| year=$1 | |
| if (( !(year % 4) && ( year % 100 || !(year % 400) ) )) | |
| then | |
| echo 366 | |
| else | |
| echo 365 | |
| fi | |
| } |
| // 2019-03-24 | |
| // Switch Search Engine | |
| var o_baidu = { | |
| url_id: ".baidu.", | |
| url_q: "wd=", | |
| url_s: "https://www.baidu.com/s?wd=", | |
| }; | |
| var o_google = { | |
| url_id: ".google.", | |
| url_q: "q=", |
| # Enable tap to click (Trackpad) for this user and for the login screen | |
| # For Laptop's Trackpad | |
| defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true | |
| # For Magic Trackpad | |
| defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
| defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
| defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 |
| tell application "Google Chrome" | |
| set weburl to the URL of the active tab of the front window | |
| end tell | |
| set appurl to "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --app=" & weburl | |
| do shell script appurl |
| # 方法一:Python 2.x: | |
| import urllib2 | |
| contents = urllib2.urlopen("http://example.com/foo/bar").read() | |
| # 方法二:Python 3.x: | |
| import urllib.request | |
| contents = urllib.request.urlopen("http://example.com/foo/bar").read() | |
| # 方法三:需要安装requests | |
| import requests |
| # macOS 终端执行: | |
| /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://www.google.com/" |
| <?php | |
| // 简化版 get、post | |
| // 利用PHP的curl模拟GET功能 | |
| function geturl($url) | |
| { | |
| $ch = curl_init(); //初始化curl | |
| curl_setopt($ch, CURLOPT_URL, $url); //指定请求链接 | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); |
| -- Description: | |
| -- POSIX path uses the slash "/" as the separator. POSIX path looks like Unix style path | |
| -- AppleScript path uses the colon ":" as the separator | |
| -- Read More: http://www.satimage.fr/software/en/smile/external_codes/file_paths.html | |
| -- To translate a UNIX path (file or directory, valid or not) into an AppleScript file reference. | |
| set p to "/usr/local/bin/" | |
| set a to POSIX file p | |
| -- file "Macintosh HD:usr:local:bin:" |