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 / start.sh
Created September 30, 2026 04:08
Minecraft 服务器启动脚本(自动使用代理环境变量)
#!/bin/bash
#
# Minecraft 服务器启动脚本
# 用法:
# HTTP_PROXY=http://127.0.0.1:7890 \
# HTTPS_PROXY=http://127.0.0.1:7890 \
# ./start.sh
#
set -euo pipefail
@SomeBottle
SomeBottle / func.js
Created September 7, 2026 07:10
配合数据万象支持又拍云图像处理参数风格的 EO 函数
/**
* Tencent Cloud EdgeOne Edge Function
*
* 功能:
* 将又拍云风格的图片处理参数转换为腾讯云 COS 数据万象 ImageMogr2 参数。
*
* 当前支持:
*
* !/scale/50
* ->
@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.
{"9d54c7eddd15ec31726b29f592430e47936c3efc":12032,"2540ae57553e3c3542668335cd21e6ccb4ed8ab2":19969,"878a66be9424c1da6738ca0d09dd538582cd41d2":19970,"118ba31cd91449d121f0469a2a647dfc6625b7e5":19971,"fe2b90646077c39fba114f88ac2d63b1923c6e5f":19972,"ea0f566843ecbddf7b0a9d215bffca33c15725ed":19973,"720760930a2f444665169e0b524c896769336348":19974,"be938217e8ea5e6965f9b99e54c4bfc41c859d70":19975,"8a7744c667afba4775d52e65f0c419990016bd23":19976,"e7f1ced4c6273859fad3fe2f5d0aec181291abfe":19977,"5cb1b6f51fbac5f78c8cc550614095ed68650f3f":19978,"55a178610fa82dc2e0b9fd3c752eb9ba71ca4d48":19979,"f24265507e45131a2c7b3f0c93ead25c530e8ba0":19980,"0450a4f34119fcb0655cb742ad0f4cc2f0f552dc":19981,"f63c174636a2c29b9914cca6e981f4426a6c51b8":19982,"a0c5d30a57d0b2e50765b1190e9fa51b4183deb6":19983,"491615a9dc790d5b15d18bf7f2ff1949ae56a541":19984,"53054ea486228f97a1e1dea34561fc54f542a0bc":19985,"7efcec7e16bdad5da8b331f72328c9412a7690e2":19986,"c3a2402cc6fc8018c271d2d3fea756808bd90c22":19987,"c196a2f379a6e60980c5097b96b330025f932153":
{"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":