Skip to content

Instantly share code, notes, and snippets.

View Loongphy's full-sized avatar
🚀
Landing Mars

Loongphy Wei Loongphy

🚀
Landing Mars
View GitHub Profile
@Loongphy
Loongphy / codex-windows-app-proxy-start.ps1
Created March 7, 2026 04:49
fix reconnecting issues for Codex Windows App by forcibly injecting proxy environment variables
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -Command '& {
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
$env:ALL_PROXY="socks5://127.0.0.1:7890"
$env:NO_PROXY="localhost,127.0.0.1,::1"
$extra="HTTP_PROXY/u:HTTPS_PROXY/u:ALL_PROXY/u:NO_PROXY/u"
if ([string]::IsNullOrWhiteSpace($env:WSLENV)) { $env:WSLENV=$extra } else
{ $env:WSLENV=$env:WSLENV+":"+$extra }
$pkg=Get-AppxPackage OpenAI.Codex
@Loongphy
Loongphy / sub.yaml
Last active May 27, 2025 03:40
Mihomo Override geosite rules
proxy-groups:
- name: 🚀 默认
type: select
proxies: [🇭🇰 香港自动, 🇯🇵 日本自动, 🇺🇸 美国自动, 🇺🇸 美国, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🌐 全部, DIRECT]
- name: Ⓜ️ Microsoft
type: select
proxies: [DIRECT, 🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 💬 OpenAI
type: select
proxies: [🇺🇸 美国]
@Loongphy
Loongphy / devtools.fish
Last active November 8, 2025 11:50
fish script
# ~/.config/fish/conf.d/devtools.fish
# kill the process of the specified port
function kp
set port $argv[1]
lsof -i:$port | awk "NR==2{print $2}" | xargs kill -9
end
# git commands
alias main="git checkout main"