Skip to content

Instantly share code, notes, and snippets.

View roy2220's full-sized avatar
🎯
Focusing

Roy O'Young roy2220

🎯
Focusing
  • Guangzhou, China
View GitHub Profile
@superseb
superseb / k3s-etcd-commands.md
Last active July 25, 2025 14:44
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@sainnhe
sainnhe / gruvbox-material-alacritty.yml
Last active July 4, 2025 11:54
Gruvbox Material for Alacritty
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
@fnky
fnky / ANSI.md
Last active October 2, 2025 07:34
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@pshchelo
pshchelo / mount-qcow2-lvm-image.sh
Last active August 4, 2025 09:00
List of commands to mount/unmount a qcow2 image conatining LVM partitions.
# kudos to dzaku at consolechars.wordpress.com
### MOUNT qcow2 image with lvm partitions
# ensure nbd can handle that many partitions
sudo modprobe nbd max_part=8
# present image as block device through NBD
sudo qemu-nbd --connect=/dev/nbd0 <image.qcow2>
@rdbox
rdbox / etc.fstab
Last active June 14, 2024 20:17
Ubuntu guest VMware shared folders vmhgfs-fuse
# Данные Команды добавляют в автозагрузку shared folders VMware
# Вариант 1.
a. Install open-vm-tools, apt-get install open-vm-tools.
b. Install open-vm-tools-dkms, apt-get install open-vm-tools-dkms.
c. Run /usr/bin/vmware-hgfsclient, it will display your shared folder.
d. Update your /etc/fstab using the details below:
bindkey -e
source ~/.zplug/zplug
zplug "plugins/git", from:oh-my-zsh, if:"which git"
zplug "plugins/tmux", from:oh-my-zsh, if:"which tmux"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/docker-compose", from:oh-my-zsh
zplug "plugins/command-not-found", from:oh-my-zsh
@messa
messa / asyncio_ssl_example.py
Created June 26, 2015 12:43
Python asyncio + SSL TCP client/server example
#!/usr/bin/env python3
import asyncio
import multiprocessing
import os
import ssl
from time import sleep
port = 9000