Skip to content

Instantly share code, notes, and snippets.

View enihsyou's full-sized avatar

九条涼果 enihsyou

View GitHub Profile
@enihsyou
enihsyou / 20-fastfetch.sh
Created August 19, 2025 06:22
Run 'whatever-fetch' on SSH session login
#!/usr/bin/env bash
# shellcheck disable=SC2086
# Run 'whatever-fetch' on SSH session login
# This file is intended to be placed in /etc/update-motd.d/ and
# executed by pam_motd.so upon login (Debian). It may also be placed in /etc/profile.d/
# to run when profile files are loaded; the two differ in execution timing.
# read username from 'sshd-session' process
# https://superuser.com/questions/981897/trying-to-print-username-at-message-of-the-day-motd/1178598#1178598
@enihsyou
enihsyou / surfingkeys-settings.js
Last active August 24, 2025 15:07
Advanced settings for Surfingkeys Chrome extension. Enable loading settings from URLs. This file is kept in sync with https://github.com/enihsyou/dotfiles/blob/Windows/gui-app/Chrome/surfingkeys-settings.js
// Advanced settings for Surfingkeys Chrome extension
// 增大滚动步长,默认是 70
settings.scrollStepSize = 100;
settings.omnibarSuggestion = true;
// 按下 r 键以刷新推荐流,而不是刷新页面
api.mapkey(
"r",
@enihsyou
enihsyou / docker-mirror-speedtest.md
Last active August 28, 2025 15:28
Docker Hub 镜像测速脚本

Docer Registry HTTP v2 API 需要使用 Bearer Token 才能访问,大大增加了访问难度,像 [chsrc] 这样的静态链接测速工具难以对 DockerHub 测速。

不测速就不知道各个镜像的质量,实际上很多网络上的镜像站点都是通过 Cloudflare Worker 搭建的。 我想要知道真实的下载速度,所以有了这个脚本。

  • 大部分逻辑来自 [enihsyou/docker-mirror-hammal] 和 Claude 3.5 Sonnet + Gemini 2.5 Pro
  • Bash 版本兼容于 Linux/macOS,Powershell 版本兼容于 Windows + Powershell 7
  • 镜像列表来自互联网,感谢发布者
  • 本代码以 [MIT] 协议发布
@enihsyou
enihsyou / MacType.ini
Created February 3, 2025 10:33
自用的 MacType 配置文件,适用 SAMSUNG G85SB QD-OLED 3440*1440显示器
[General]
Name=九条涼果
Icon=..\mactray.exe.ico,0
;【自动挂钩子进程】
;[0:Disable] 1:Enable
HookChildProcesses=1
;【字体微调】
;0:Normal 1:NoHinting 2:AutoHinting 3:Light+AutoHinting
@enihsyou
enihsyou / 黑雾回收站(高纬度高流量有电网).txt
Created January 12, 2024 16:31
戴森球计划 黑雾回收站(高纬度高流量有电网版)视频说明书 https://www.bilibili.com/video/BV1ZK4y1B79x 相比原版添加了中间的电线杆
BLUEPRINT:0,50,5206,5204,5202,5203,5205,0,638407006633706293,0.10.28.21308,%E9%BB%91%E9%9B%BE%E5%9B%9E%E6%94%B6%E7%AB%99%EF%BC%88%E9%AB%98%E7%BA%AC%E5%BA%A6%E9%AB%98%E6%B5%81%E9%87%8F%E6%9C%89%E7%94%B5%E7%BD%91%EF%BC%89,%E8%A7%86%E9%A2%91%E8%AF%B4%E6%98%8E%E4%B9%A6%20https%3A%2F%2Fwww.bilibili.com%2Fvideo%2FBV1ZK4y1B79x%0Amodified%20by%20%40enihsyou%20%E7%9B%B8%E6%AF%94%E5%8E%9F%E7%89%88%E6%B7%BB%E5%8A%A0%E4%BA%86%E4%B8%AD%E9%97%B4%E7%9A%84%E7%94%B5%E7%BA%BF%E6%9D%86"H4sIAAAAAAAAC+y9B5QVxRM3OpvYJciiIFlBDICgSJCFBdmZuRhQERXEDBjBiFkUFVBJJsDwBxQFI4oi6JJBQSUp5oQKAqKCgYyS2fvVb7rqTrlb8r7jeee9o+w9p4efHopO1dVV1dXVaZ7n1aKS7blfSyq5jNO8pOf14f+d643K4f+/LTkywJ97ksN8jT/xpoQoX2Qf6R2S5nlJ+qXhn0n9e/Qr49UNVyYLgp5eH19jz2uRQGmTc3MaCMdl0F8+wBFemtnfS+d/4Lhb1b9Y+ttvfph/ryjZKMUwGhdnng/Bzsw8fbNKmWd//0GWkIgaGeR4lYI8YhiNizPPDZBzzDxXZZYyz/7+y8QHDCPSRuPizHMx/jYzz+WZpcyzv/+y8CnrTQ72EsNA2mhcnHnqqG3rrCqlzLO//8rgA4bBVrU0ebuvcXHmuQl/m5lnW0Yp8+zvv2z3aRyKnqNxceapqZhnVmYp8+zvv8jU35vMSzGMxsWZ50lwCDPPjlLJs9//yuKTTM4Nnth8Uqsq3jxf42xvSpjNTqKHM0o6icrh
@enihsyou
enihsyou / custom-ui.css
Last active February 3, 2025 11:45
VSCode custom CSS imports content
/* vscode/src/vs/workbench/contrib/terminal/browser/media/terminal.css */
/* 从放置在底部的终端面板中移除顶部的空白
在窗口多余空间不满一行的时候 这个空白尤为明显
会让顶部文本和边框之间产生一段空隙 */
.monaco-workbench .editor-instance .xterm,
.monaco-workbench .pane-body.integrated-terminal .xterm {
bottom: unset;
top: 0;
}
@enihsyou
enihsyou / README.md
Created May 3, 2022 07:53
my kitty symbol_map section for Nerd Font patch and CJK characters.

What's this

symbol_map section from my kitty.conf dotfile, it follows Kitty best practice to NOT use patched font in favor of multiple symbol_map directives.

I use [Sarasa Mono][sarasa_mono] for CJK unicode ranges and [Menlo] for misc codepoints which Nerd Font doesn't cover.

Copy and paste (maybe follow by some modifacations) into your kitty.conf, and your terminal will be beautiful.

@enihsyou
enihsyou / README.md
Last active July 13, 2023 07:31
Make kitty terminal emulator aware macOS system appearance change (aka Dark Mode).

What's this

Make kitty terminal emulator aware macOS system appearance change. But not perfect, since this script is not "listening" change event, but rather be triggered by new shell creation.

How to use

  1. pick two theme conf, one for light (basic-light.conf here) and one for dark (basic-dark.conf)
  2. create two file inside KITTY_CONFIG_DIRECTORY(~/.config/kitty here), macos-launch-services-cmdline-dark.conf and macos-launch-services-cmdline-light.conf
  3. tweak macos-launch-services-cmdline-*.conf, add kitty.conf and theme.conf, note that args should use full path.
@enihsyou
enihsyou / basic-dark.conf
Created April 30, 2022 16:46
A Kitty theme: Basic profile on Terminal.app for macOS.
# vim:ft=kitty
## name: Basic Dark
## author: enihsyou
## license: MIT
## blurb: Basic (dark) profile on Terminal.app for macOS.
#: The basic colors
foreground #ffffff
@enihsyou
enihsyou / Merlin Enable IPv6 Passthrough.md
Created April 4, 2022 07:04
NetGear R8500 Merlin 380.70_0-X7.9.1 开启IPv6能力