Skip to content

Instantly share code, notes, and snippets.

@Teraflopst
Teraflopst / ACL4SSR-Helps.md
Created February 13, 2022 15:29
本文主要是教你怎么定制一下自己的ACL或者clash规则。

1. 前言

本文主要是教你怎么定制一下自己的ACL或者clash规则。

前面稍微科普一下去广告的分类、不作为重点。

本文不能顾及全网的规则,仅做一般普及,需要有点基础,非小白科普文章

@Teraflopst
Teraflopst / 麦克米伦7000高频词(释义).txt
Last active May 20, 2024 23:20
麦克米伦7000高频词,列表 & 释义
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)人名;(法)阿布
@Teraflopst
Teraflopst / year-progress.sh
Last active March 27, 2019 13:26
Year Progress 一年时间进度
# 判断闰年平年
cal_days_in_year() {
year=$1
if (( !(year % 4) && ( year % 100 || !(year % 400) ) ))
then
echo 366
else
echo 365
fi
}
@Teraflopst
Teraflopst / switch-search-engine.js
Created March 23, 2019 19:39
切换搜索引擎搜索关键字 Switch Search Engine
// 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=",
@Teraflopst
Teraflopst / trackpad-tap-to-click.sh
Created March 13, 2019 10:36
Enable macOS Trackpad "Tap to Click"
# 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
@Teraflopst
Teraflopst / open-with-chrome-app-mode.script
Created March 11, 2019 10:02
macOS 以 Chrome App 模式打开当前网页
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
@Teraflopst
Teraflopst / python-http-get.py
Last active March 10, 2019 05:39
Python 的几种 HTTP GET 方法
# 方法一: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
@Teraflopst
Teraflopst / chrome-app-mode.sh
Created March 9, 2019 23:04
Google Chrome App Mode(App 模式)
# macOS 终端执行:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://www.google.com/"
@Teraflopst
Teraflopst / php-get-post-v1.php
Last active March 23, 2019 16:47
PHP 利用 curl 发送 post get请求
<?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);
@Teraflopst
Teraflopst / applescript-n-posix-paths.scpt
Created August 23, 2016 04:51
AppleScript and POSIX paths translation
-- 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:"