Skip to content

Instantly share code, notes, and snippets.

View Loongphy's full-sized avatar
🚀
Landing Mars

Loongphy

🚀
Landing Mars
View GitHub Profile
@Loongphy
Loongphy / no-use-effect.md
Created March 20, 2026 11:40 — forked from alvinsng/no-use-effect.md
Skill generated by Factory Droid
name no-use-effect
description Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch.

No useEffect

@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"