Skip to content

Instantly share code, notes, and snippets.

View SilverRainZ's full-sized avatar
😘
Falling in love

Shengyu Zhang SilverRainZ

😘
Falling in love
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>
@fsantand
fsantand / wireplumber_audio_switcher.py
Created February 8, 2024 23:49
Wireplumber switcher for rofi/dmenu
#!/usr/bin/python3
import sys
import subprocess
"""
Wireplumber sink/source switcher
It lets you pass your sinks/sources into a dmenu dropdown
for ease of access

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 May 13, 2025 03:28
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 March 31, 2025 06:31
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 May 9, 2025 23:46
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 May 10, 2025 22:15
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 May 12, 2025 01:53
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@yougg
yougg / proxy.md
Last active May 7, 2025 13:04
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)