Skip to content

Instantly share code, notes, and snippets.

View fuweid's full-sized avatar
🎯
Focusing

Fu Wei fuweid

🎯
Focusing
View GitHub Profile
Release Status Start End of Life
1.5 End of Life May 3, 2021 February 28, 2023
1.6 LTS February 15, 2022 max(February 15, 2025 or next LTS + 6 months)
1.7 Active March 10, 2023 active(release of 2.0 + 6 months), extended(EOL of 1.6)
2.0 Next TBD TBD
package main
import (
"bufio"
"fmt"
"io"
"os"
"reflect"
"sort"
"strconv"
package main
import (
"context"
"flag"
"fmt"
"strings"
"sync"
corev1 "k8s.io/api/core/v1"
kubeadm init --cri-socket /run/containerd/containerd.sock --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl taint nodes ubuntu-bionic node-role.kubernetes.io/master-
From aa157746c01806af89f645ed2c5df8be45c1790d Mon Sep 17 00:00:00 2001
From: Wei Fu <fuweid89@gmail.com>
Date: Thu, 24 Aug 2023 07:39:25 +0000
Subject: [PATCH] delete v1.16.0 deps
Signed-off-by: Wei Fu <fuweid89@gmail.com>
---
api/etcdserverpb/gw/rpc.pb.gw.go | 170 ++++-----
pkg/go.mod | 11 +-
pkg/go.sum | 15 +-
From c4fc29e2b59863572b62a539e03e545bc7caaac7 Mon Sep 17 00:00:00 2001
From: Wei Fu <fuweid89@gmail.com>
Date: Wed, 23 Aug 2023 04:09:03 +0000
Subject: [PATCH] add legacygwjsonpb
Signed-off-by: Wei Fu <fuweid89@gmail.com>
---
pkg/legacygwjsonpb/marshal.go | 292 ++++++++++++++++++++++++++++++++++
scripts/test.sh | 4 +-
server/embed/serve.go | 8 +-
@fuweid
fuweid / gist:de5e21012f7eba2b7b2d694f1a8ea20a
Created September 17, 2022 10:26 — forked from simonheb/gist:b54b91358c3d7e2960a4f6e13e95ac54
Patching the 5.12 Linux kernel to support new Intel hardware (e.g., Intel Iris Xe for Thinkpad X1 Titanium Yoga) on Ubuntu/Debian/Pop!_OS

Get a 5.12 Linux kernel with support for newer Intel hardware (e.g., Intel Iris Xe for Thinkpad X1 Titanium Yoga) on Ubuntu/Debian/Pop!_OS

Prologue: Do I need this?

I recently got a Thinkpad sporting an Intel® Core™ i5-1140G7 Processor 11. gen (1,80 GHz, Turbo Boost, 4 Cores, 8 Threads, 8 MB Cache with an Integrated Intel® Iris® Xe. Sadly graphics drivers did not work out-of-the-box and also not with the latets 5.12 kernel from xenmod. You can tell it's not working when graphics are slow, backlight adjustment buttons don't work and this is the output of inxi -G (you might need to sudo apt install inxi):

simon@pop-os:~$ inxi -G
Graphics:
  Device-1: Intel driver: N/A 
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.9 driver: fbdev unloaded: modesetting,vesa 
 resolution: 2256x1504~95Hz 
@fuweid
fuweid / 2019-https-localhost.md
Created April 3, 2023 06:42 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

#!/usr/bin/env bash
set -euo pipefail
target_snapshot_id=$1
parent_id=""
snapshot_ids=""
# ensure that it is valid input
ctr -n k8s.io snapshot usage $target_snapshot_id > /dev/null