Skip to content

Instantly share code, notes, and snippets.

@oraix
oraix / claude-code-with-github-copilot.md
Created October 22, 2025 15:26 — forked from cht-k/claude-code-with-github-copilot.md
透過 copilot-api 和 claude-code-router,將您的 GitHub Copilot Business 訂閱變成 Claude Code 的強大後端

背景與動機

在當前的技術社群,像 Claude Code 這類工具因其引領的「Vibe Coding」風潮而備受推崇。 這種開發方式,指的是開發者透過自然語言描述問題,引導 AI 產生、修改及審閱程式碼, 將傳統的手動編碼轉變為指導與迭代 AI 生成結果的過程,大幅提升了開發效率。

然而,許多對資安較為嚴謹的公司會將原始碼視為機密資料,禁止使用未經審核的外部 AI 服務來處理程式碼。 這意味著像 Cursor、Windtunnel,或是直接串接外部 API 的作法都可能不合規。

在這種情況下,一個常見的合規方案就是 GitHub Copilot Business 訂閱。

@oraix
oraix / pycdump.py
Created April 18, 2019 15:32 — forked from anonymous/pycdump.py
Dump .pyc file (Python 3.5 version)
#
# read a .pyc file and pretty-print it
#
# copied from http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html
# and updated to Python 3.5 (Nov 10th 2015)
@oraix
oraix / recover_source_code.md
Created April 18, 2019 14:59 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@oraix
oraix / robotmatrix.py
Last active July 2, 2018 03:27
openai 第三周作业代码
import logging
import sys
from collections import defaultdict
from gym.envs import register
import gym
from gym.utils import seeding
logger = logging.getLogger(__name__)