Skip to content

Instantly share code, notes, and snippets.

@sxzz
sxzz / GitHub.sh
Last active November 5, 2023 09:03
GitHub CLI scripts
# Get the owner of the repository to which you contributed (Pull Requests)
gh api graphql --paginate -f query='
query($endCursor: String) {
user(login: "username") {
pullRequests(first: 100, after: $endCursor, states: MERGED) {
nodes { repository { owner { login } } }
pageInfo {
hasNextPage
endCursor
@Innei
Innei / vscode.json
Last active June 21, 2024 10:04
vscode
{
"editor.fontSize": 14,
"editor.fontFamily": "\"OperatorMonoSSmLig Nerd Font\",\"Cascadia Code PL\",\"FantasqueSansMono Nerd Font\",\"operator mono\",\"Fira code Retina\",\"Fira code\",\"Consolas\", Monaco, \"Hannotate SC\",-apple-system",
"editor.formatOnType": true,
"editor.fontWeight": "bold",
"workbench.iconTheme": "material-icon-theme",
"files.autoGuessEncoding": false,
"editor.parameterHints.enabled": true,
"typescript.tsserver.maxTsServerMemory": 1024,
"window.nativeTabs": true,
Other 20 mins █████████████░░░░░░░░ 62.1%
Swift 10 mins ███████░░░░░░░░░░░░░░ 33.8%
JavaScript 0 secs ▍░░░░░░░░░░░░░░░░░░░░ 2.1%
YAML 0 secs ▎░░░░░░░░░░░░░░░░░░░░ 1.6%
JSON 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.3%
@Kyle-Ye
Kyle-Ye / iPhone Mirroring.md
Last active July 24, 2024 08:40
Launch iPhone Mirroring.app on macOS 15 Beta 1
@Kyle-Ye
Kyle-Ye / XcodeLLM.md
Last active July 24, 2024 09:29
Enable XcodeLLM for ChinaSKU Mac on macOS 15 Beta 1

Warning

The following guide need to disable SIP to work.

Please confirm the risk of disabling the SIP by yourself.

Another solution which does not require disabling SIP is currently under investigation.

Step 0

Reboot into Recovery OS + Disable SIP

@unixzii
unixzii / ForceEnablingXcodeLLM.md
Last active July 24, 2024 09:43
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

Clash Meta eBPF Feature

为什么使用 eBPF

此处从 dae 项目 copy

通过 eBPF 在 Linux 内核的 tc (traffic control) 挂载点加载一个程序,通过该程序在流量进入 TCP/IP 网络栈之前进行流量分流。tc 在 Linux 网络协议栈中的位置见下图所示(图为收包路径,发包路径方向相反),其中 netfilter 是 iptables/nftables 的位置。