Skip to content

Instantly share code, notes, and snippets.

View talentestors's full-sized avatar
🍭
Working

talentestors

🍭
Working
  • Gensokyo
View GitHub Profile
@talentestors
talentestors / wiki_gui.py
Created September 18, 2025 07:51
Crawl wiki images and articles, and convert wiki articles to Markdown format
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "beautifulsoup4",
# "markdownify",
# "opencc-python-reimplemented",
# "requests",
# "wikipedia",
# ]
# ///
@talentestors
talentestors / MaterialMy.css
Last active October 22, 2025 07:45
Cherry Studio Theme
/* MaterialYou主题 CSS */
:root {
/* MaterialYou基础尺寸 */
--material-line-width: 0.3px;
--container-border-radius: 15px;
--list-item-border-radius: 8px;
/* 过渡时间 */
--duration-fast: 0.2s;
--duration-normal: 0.3s;
--easing-ease: ease;
@talentestors
talentestors / search_text.py
Created April 27, 2025 15:37
Search for text within a file, starting from the current file directory. `python test.py --search word` || `python test.py -s word`
import os
import argparse
def search_text_in_files(search_term, start_dir):
"""
递归检索目录中的文本文件,查找特定文本内容。
:param search_term: 要查找的文本内容
:param start_dir: 开始搜索的目录
"""
@talentestors
talentestors / ABOUT-ASCII-art-gallery.md
Last active November 8, 2025 10:58
ASCII art gallery
@talentestors
talentestors / SpringApp.java
Last active March 11, 2025 02:56
In the Spring Boot startup class, the URI address of the application is output and the org.fusesource.jansi library is used to add color to the console output.
@Slf4j
@SpringBootApplication
public class SpringApp {
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext application = SpringApplication.run(App.class, args);
Environment env = application.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = env.getProperty("server.servlet.context-path");
if (!StringUtils.hasLength(path)) {
@talentestors
talentestors / autocmds nvim-tree.lua
Created December 6, 2024 08:42
For neovim & vim
local autocmd = vim.api.nvim_create_autocmd
-- nvim-tree 自动关闭
-- 定义是否为启动后的第一次 BufEnter 事件
local is_first_bufenter_after_start = true
autocmd("BufEnter", {
nested = true,
group = 'myAutoGroup',
callback = function()
@talentestors
talentestors / ccache.cmake
Created December 6, 2024 08:10
For CMakeLists
# Configure ccache if available
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif (CCACHE_FOUND)
@talentestors
talentestors / A Top.md
Last active December 6, 2024 08:34
For OI/ACM & CodeForces/LeetCode/LuoGu/AtCoder/nowcoder