Skip to content

Instantly share code, notes, and snippets.

View HUGHNew's full-sized avatar
摸鱼中

Hugh Liu HUGHNew

摸鱼中
View GitHub Profile
@HUGHNew
HUGHNew / flag.py
Created October 3, 2025 06:54
Flag for modern MING
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, Ellipse, Rectangle
# 定义颜色常量
RED = "#DE2910"
YELLOW = "#FFD700"
BLACK = "#111111"
def draw_modern_ming_flag():
@HUGHNew
HUGHNew / sh_func.sh
Created September 17, 2025 04:55
Dispatch your GPU task with Conda/Mamba in a faster way
function order() {
args=("$@")
args=("${args[@]:1}")
if env|grep CONDA_PREFIX > /dev/null;then
__LDP=$LD_LIBRARY_PATH:$CONDA_PREFIX
fi
LD_LIBRARY_PATH=$__LDP CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=$1 ${args[@]}
}
@HUGHNew
HUGHNew / apt_install_nv_driver.sh
Last active August 31, 2025 12:08
Specific version nvidia-driver for Debian with cuda-keyring
# 550.163.01-2 for Debian 13 stable
NV_DRIVER_VER=550.163.01-2 cat << EOF | xargs sudo apt install -y --allow-downgrades
libcuda1=$NV_DRIVER_VER
libnvidia-ptxjitcompiler1=$NV_DRIVER_VER
libnvidia-pkcs11-openssl3=$NV_DRIVER_VER
nvidia-smi=$NV_DRIVER_VER
libnvidia-ml1=$NV_DRIVER_VER
nvidia-driver=$NV_DRIVER_VER
nvidia-driver-libs=$NV_DRIVER_VER
libgl1-nvidia-glvnd-glx=$NV_DRIVER_VER
@HUGHNew
HUGHNew / OSS.map.yml
Created February 29, 2024 12:06
Open Source Software Recoder
Linux:
epub: Foliate # https://github.com/johnfactotum/foliate
video:
common: VLC
anime: MPV # thanks for Anime4K project (https://github.com/bloc97/Anime4K)
bt: Motrix # https://github.com/agalwood/Motrix
picture:
manager: digiKam # https://digikam.org/
process: darktable # https://www.darktable.org/
film_filter: Filmulator # https://filmulator.org/
@HUGHNew
HUGHNew / comments.vim
Created January 10, 2024 06:56
comment plugin for vim, ^C to comment and ^X to uncomment in normal mode (visual mode support).Mod vs V2.12: add zsh and python support
" original version: https://www.vim.org/scripts/script.php?script_id=1528
" *********************************************************************************************
" comments.vim
" *********************************************************************************************
" Description : Global Plugin to comment and un-comment different
" source files in both normal and visual <Shift-V> mode
" Last Change : 26th April, 2006
" Created By : Jasmeet Singh Anand <[email protected]>
" Version : 2.2
" Usage : For VIM 6 -
@HUGHNew
HUGHNew / clash-corpse.md
Last active November 3, 2023 13:01
Cyber-tombstone for clash and clash family
@HUGHNew
HUGHNew / concat.py
Created June 25, 2023 05:17
concat screenshots in vertical view
"""
for Android Termux images concat vertically usage
requirements.txt:
pillow
typer
mannul installation
typer: pip
pillow:
@HUGHNew
HUGHNew / spirits_compose.py
Created April 3, 2023 12:40
Stitching equal parts of the picture
import requests as reqs
from PIL import Image
urls = [ # your images in group
[
"", "", ""
],
[],
[]
]
#!/bin/env bash
#
# lework
# Os repo mirror site speed test.
######################################################################################################
# environment configuration
######################################################################################################
# Set-ExecutionPolicy RemoteSigned # enable script exec
#------------------------ Import BEGIN ---------------------------#
Import-Module PSReadLine # Install-Module -Name PSReadLine
# to know more: https://github.com/PowerShell/PSReadLine/blob/master/README.md
#------------------------------- Set Hot-keys BEGIN -------------------------------
# 设置 Tab 键补全
# Set-PSReadlineKeyHandler -Key Tab -Function Complete
# 命令行使用 Emacs 模式 (与Bash一致)
Set-PSReadLineOption -EditMode Emacs