Skip to content

Instantly share code, notes, and snippets.

View SomeBottle's full-sized avatar
😇
Drowning in the ocean of knowledge.

SomeBottle SomeBottle

😇
Drowning in the ocean of knowledge.
View GitHub Profile
@SomeBottle
SomeBottle / README.md
Last active June 6, 2026 06:26
Codex MCP Startup Setter

Codex MCP Startup Setter

Codex MCP 服务默认超时时间是 10s,如果要配置超时时间需要单独给每个 MCP Server 配置,没有一个全局的配置!!(不理解这个设计)

CC Switch 也是一直没有这方面的通用配置,有很多人反馈,但官方到目前也没有什么行动,其中一个 issue:farion1231/cc-switch#831

没办法,只能自己 vibe 一个工具了。

  • 另外如果环境变量中如果有 http_proxy, https_proxy 这些代理设置,也会通过 env_vars 配置给 MCP 服务,保证 context7 这类需要联网的 MCP 服务能正常运作
@SomeBottle
SomeBottle / MergeConsecutiveCrossReferences.bas
Created May 20, 2026 06:34
Word 参考文献列表引用 [1][2][3] 转换为 [1-3] 格式的宏
Sub MergeConsecutiveCrossReferences()
Dim flds As Fields
Set flds = Selection.Fields
' 1. 检查选区内是否有足够的域
If flds.Count < 2 Then
MsgBox "请先用鼠标选中需要合并的连续交叉引用(例如选中 [1][2][3])。", vbExclamation, "提示"
Exit Sub
End If
@SomeBottle
SomeBottle / Dockerfile
Last active January 20, 2026 15:06
My JupyterLab Dockerfile for Research Experiments
# FROM python:3.11.14-bookworm
FROM docker.1ms.run/python:3.11.14-bookworm
# 【可配置环境变量】
# JUPYTER_PASSWORD: Jupyter 登录密码,不配置的话默认是随机字串
# JUPYTER_WORKDIR: 工作目录,默认是 /app
# JUPYTER_PORT: Jupyter 端口,默认是 9527
ENV JUPYTER_WORKDIR="/app" \
JUPYTER_CONF_DIR="/home/somebottle/.jupyter" \
@SomeBottle
SomeBottle / web_api.py
Created April 9, 2025 09:46
Deepseek VL2 Web API (Modified based on web_demo.py from the official repo)
# Copyright (c) 2023-2024 DeepSeek.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@SomeBottle
SomeBottle / instruction.md
Created January 26, 2025 17:43
Alternative to Docker in Google Colab: Apptainer
@SomeBottle
SomeBottle / custom_matplotlib_fonts.ipynb
Created November 23, 2024 05:05
Custom CJK font for matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SomeBottle
SomeBottle / original_glyph_to_uni.json
Created October 18, 2024 08:01
Source Han Sans SC 字体中所有基本汉字字形的 SHA-1 哈希与 Unicode 码点的映射
This file has been truncated, but you can view the full file.
{"uni65AF": "uni2E9F", "uni7403": "uni2EA0", "uni7EA6": "uni2EC5", "uni539F": "uni2EC6", "uni8F6F": "uni2ECB", "uni793A": "uni2ED3", "uni7B97": "uni2ED4", "uni88AB": "uni2ED8", "uni4FA7": "uni2EDA", "uni4F17": "uni2EDB", "uni79FB": "uni2EDD", "uni63CF": "uni2EE2", "uni54C1": "uni2EE3", "uni65AD": "uni2EE9", "uni51CF": "uni2F00", "uni7A7A": "uni2F04", "uni7597": "uni2F06", "uni6362": "uni2F08", "uni589E": "uni2F09", "uni6253": "uni2F0A", "uni7F51": "uni2F0F", "uni5185": "uni2F12", "uni706F": "uni2F17", "uni6C42": "uni2F1C", "uni7EA4": "uni2F1D", "uni522B": "uni2F1F", "uni7528": "uni2F20", "uni505A": "uni2F24", "uni57F9": "uni2F25", "uni8BAD": "uni2F26", "uni809D": "uni2F29", "uni54CD": "uni2F2D", "uni7ED3": "uni2F2F", "uni79BB": "uni2F30", "uni57CE": "uni2F32", "uni5740": "uni2F34", "uni5224": "uni2F3C", "uni6D4B": "uni2F3E", "uni5047": "uni2F3F", "uni4E00": "uni2F40", "uni52A0": "uni2F42", "uni4E70": "uni2F43", "uni6392": "uni2F45", "uni8840": "uni2F46", "uni5DE5": "uni2F47", "uni544A": "uni2F49", "uni50A8":
@SomeBottle
SomeBottle / 2022-lanqiao-final-leftRightShift.cpp
Created February 9, 2023 05:19
2022蓝桥杯国赛B组-左移右移
#include <cstdio>
using namespace std;
// 链表节点
typedef struct Node
{
int data;
Node *prev; // 指向前一个节点
Node *next; // 指向后一个节点
@SomeBottle
SomeBottle / basic-19.cpp
Created November 22, 2022 10:31
【错误题解】蓝桥杯VIP基础-完美的代价
/*
题目链接:https://www.dotcpp.com/oj/problem1467.html
注意!这是错误题解,有一个测试例可以造成死循环:
7
ewfwsea
*/
#include <cstdio>
#include <vector>
using namespace std;