Skip to content

Instantly share code, notes, and snippets.

View SilverRainZ's full-sized avatar
🤒
Out sick

Shengyu Zhang SilverRainZ

🤒
Out sick
View GitHub Profile
@nahushrk
nahushrk / ollama_model_manager.py
Created February 1, 2025 07:44
import and export ollama models between computers without downloading again
#!/usr/bin/env python3
"""
Ollama Model Manager
This script provides two modes of operation:
- export: Exports an installed Ollama model to a tarball.
- import: Imports an Ollama model from a tarball.
The export mode reads a manifest file located at:
<base_path>/manifests/registry.ollama.ai/library/<model_name>/<model_size>
@aveexy
aveexy / nginx.conf
Last active October 22, 2025 13:12
immich nginx reverse proxy with base url (not a full/complete nginx config) base url is /immich (if you want something other, replace "/immich" with other path
pid /run/nginx/nginx.pid;
error_log stderr;
daemon off;
events {
}
http {
proxy_cache_path /var/cache/nginx/immich_revprox keys_zone=immich_revprox:10m levels=1:2 use_temp_path=off inactive=1d max_size=1g;
server {
listen 0.0.0.0:443 ssl ;
@fsantand
fsantand / wireplumber_audio_switcher.py
Last active October 27, 2025 02:06
Wireplumber switcher for rofi/dmenu
#!/usr/bin/python3
#Copyright 2025 fsantand
#
#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 copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW
@AppleBoiy
AppleBoiy / alias_eza.md
Last active October 28, 2025 16:37
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup

@Pagliacii
Pagliacii / neovim-as-merge-tool.md
Last active October 22, 2025 16:53
Using Neovim as a merge tool

git

Using diffview.nvim

# ~/.gitconfig
[merge]
  tool = diffview
[mergetool]
  prompt = false
@catchdave
catchdave / replace_synology_ssl_certs.sh
Last active July 12, 2025 17:11
CLI script to programmatically replace SSL certs on Synology NAS
# MOVED to public repo: https://github.com/catchdave/ssl-certs/blob/main/replace_synology_ssl_certs.sh
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@bbqtd
bbqtd / macos-tmux-256color.md
Last active November 2, 2025 16:25
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active November 1, 2025 16:45
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active November 2, 2025 02:29
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized