# 使用 Homebrew 安装 aria2
brew install aria2
# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
This file contains hidden or 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
| cmake_minimum_required(VERSION 3.7) | |
| project(hotspot) | |
| include_directories( | |
| src/hotspot/cpu | |
| src/hotspot/os | |
| src/hotspot/os_cpu | |
| src/hotspot/share | |
| src/hotspot/share/precompiled | |
| src/hotspot/share/include | |
| src/java.base/unix/native/include |
This file contains hidden or 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
| #!/bin/bash | |
| apt install curl | |
| # | |
| # Writes sources.list in order to add non-free repository | |
| # | |
| DEBIAN_RELEASE=`cat /etc/*-release 2> /dev/null | grep PRETTY_NAME | awk -F "=" {'print $2'} | awk -F "(" {'print $2'} | awk -F ")" {'print $1'}` | |
| sourcesListFile=/etc/apt/sources.list |
This file contains hidden or 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 globalSearch(value, max = 100000) { | |
| var stack = (function () { | |
| iframe = document.createElement('iframe'); | |
| document.body.appendChild(iframe); | |
| var results = Object.getOwnPropertyNames(window).filter(p => !iframe.contentWindow.hasOwnProperty(p)).map(p => {return {type: typeof window[p], name: p, value: window[p]}}).reduce((c,p) => { | |
| c.push([p.value, 'window.' + p.name]); | |
| return c; | |
| }, []); | |
| document.body.removeChild(iframe); |
This file contains hidden or 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 TZ环境变量设置: | |
| TZ=CST-8:00 | |
| 以下为一些心得: | |
| MySQL的system_time_zone读取错误的问题,会导致以下类似命令出现Warning: | |
| show variables like '%time_zone%'; | |
| show variables like '%char%'; |
V2Ray 白話文教學介紹了如何利用 V2Ray 的路由功能將特定網站(例如 Netflix)的流量經過 Shadowsocks 轉到另一台機器上,達成解鎖流媒體的方法。
事實上,可以利用 V2Ray 的任意門協議直接將流量轉發到落地機上,進一步減少使用代理協議產生的開銷,以下為做法。
假設不能看奈飛的機器為 VPS A,可以看奈飛的機器為 VPS B。
- VPS A: 開兩個
freedomoutbound,一個給 80 端口,一個給 443 端口,並配置對應的路由規則 - VPS B: 開兩個
dokodemo-doorinbound,一個給 80 端口,一個給 443 端口,兩個 inbound 都要設置 sniffing,並配置對應的路由規則
{
"outbounds": [因特网上的一个 IP 必定属于某个 AS,也就是一个自治系统。一般一个 AS 里的 IP 具有共性,比如网络质量较高或者较差,欺诈风险较高或者较低。 在使用 mtr 或者 traceroute 查看路由时,通过确认中间路由节点 IP 的 AS,可以确认路由质量。 举例说明,对于常见的 CN2 线路,通过 mtr 看到有经过 59.43.138.70,使用 whois 命令查看 IP 信息如下
~$ whois 59.43.138.70
route: 59.43.0.0/16
descr: Chinatelecom Next Carrying Network backbone
origin: AS4809
mnt-by: MAINT-CHINANET
V2Ray 白話文教學介紹了如何利用 V2Ray 的路由功能將特定網站(例如 Netflix)的流量經過 Shadowsocks 轉到另一台機器上,達成解鎖流媒體的方法。
事實上,可以利用 V2Ray 的任意門協議直接將流量轉發到落地機上,進一步減少使用代理協議產生的開銷,以下為做法。
假設不能看奈飛的機器為 VPS A,可以看奈飛的機器為 VPS B。
- VPS A: 開兩個
freedomoutbound,一個給 80 端口,一個給 443 端口,並配置對應的路由規則 - VPS B: 開兩個
dokodemo-doorinbound,一個給 80 端口,一個給 443 端口,兩個 inbound 都要設置 sniffing,並配置對應的路由規則
{
"outbounds": [
This file contains hidden or 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
| #!/bin/sh | |
| # This script aims to address the problem of input lag that can occur when using the Chinese input method on macOS. | |
| # It provides a simple and effective solution by terminating the SCIM process, which is often the cause of the lag. | |
| # To use the script, follow these steps: | |
| # 1. Open the Terminal application (located in "Applications/Utilities/Terminal"). | |
| # 2. Copy and paste the script into the Terminal window. | |
| # 3. Press Enter to execute the script. |
OlderNewer