Skip to content

Instantly share code, notes, and snippets.

@zfy3000163
zfy3000163 / xsync.go
Created February 3, 2023 10:20 — forked from taoso/xsync.go
package xsync
import (
"context"
"fmt"
"runtime/debug"
)
// PanicGroup 并行执行多个协程并捕获所有 panic
// 使用方法如下
package xsync
import (
"context"
"fmt"
"runtime/debug"
)
// PanicGroup 并行执行多个协程并捕获所有 panic
// 使用方法如下
@thebsdbox
thebsdbox / how-to-k3s-ha.md
Last active July 22, 2022 15:01
HA K3S with kube-vip

The Architecture

Below is a sample architecture, no workers for this example :-)

  • VIP 192.168.0.40
  • K8S01 192.168.0.41
  • K8S02 192.168.0.42
  • DB01 192.168.0.43

Create our DB on DB01

@sameo
sameo / vfio.md
Last active October 11, 2025 07:55

VFIO

Not KVM bound. The VFIO API deconstructs a device into regions, irqs, etc. The userspace application (QEMU, cloud-hypervisor, etc..) is responsible for reconstructing it into a device for e.g. a guest VM to consume.

Boot with intel_iommu=on.

IOMMU groups

Devices are bound together for isolation, IOMMU capabilities and platform topology reasons. It is not configurable.

@nrollr
nrollr / nginx.conf
Last active January 20, 2026 14:16
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
#Использование ssh over sctp в freebsd
cd /usr/ports/security/openssh-portable
make config
# тут ставим галочку SCTP
make install clean
# заставляем работать портовый sshd только по протоколу sctp параллельно базовому sshd
ee /usr/local/etc/ssh/sshd_config
Port 22