Skip to content

Instantly share code, notes, and snippets.

View NCBM's full-sized avatar

worldmozara NCBM

  • China
  • 23:20 (UTC +08:00)
View GitHub Profile
@NCBM
NCBM / claudew.py
Last active April 22, 2026 17:00
Claude Code Wrapper
#!/usr/bin/env python
"""A script for managing various Claude Code service providers.
## How to use:
1. Install Claude Code: `npm install -g @anthropic-ai/claude-code`
2. Create profiles in `~/.config/claudewrapper-profiles.toml` with the following format:
```toml
[default]
@NCBM
NCBM / result.py
Created December 15, 2025 14:58
A `Result` implementation in Python
import abc
import enum
import functools
import typing
from collections.abc import Awaitable, Callable
# pyright: strictGenericNarrowing=true
class _Unset(enum.Enum):
@NCBM
NCBM / patchopt.py
Created November 11, 2025 12:00
Manage programs with default arguments and environments and replace them
#!/usr/bin/env python3
"""
patchopt - User-level command parameter patcher, independent of shell.
Stores custom args and envs in ~/.config/patchopt/patches.toml.
Creates symlinks in ~/.local/bin to itself for aliases.
Supports environment variable expansion at runtime.
"""
import os
@NCBM
NCBM / system_name.py
Last active October 13, 2023 10:15
Summarize system platform name and info
#!/usr/bin/env python3
# Author: NCBM (worldmozara)
# Date: 2023-08-29
# License: MIT
#
# Copyright (c) 2023 NCBM
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal