Skip to content

Instantly share code, notes, and snippets.

@Gentoli
Gentoli / covnerter.py
Created January 20, 2021 20:04
KLE to VIA partial Converter
import subprocess
import re
import json
macro = """
#define LAYOUT( \\
K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \\
K018, K015, K019, K016, K020, K022, K023, K024, K025, K026, \\
K027, K028, K029, K030, K031, K032, K033, K034, K035, K036, K037, K038, K039, \\
K040, K041, K042, K043, K044, K045, K046, K047, K048, K049, K050, K051, K052, \\

Keybase proof

I hereby claim:

  • I am gentoli on github.
  • I am nick_d (https://keybase.io/nick_d) on keybase.
  • I have a public key ASCYeJBxh9V1Y1GA8WV5D0iDQTTtU2E2BcWljI92OmKxVgo

To claim this, I am signing this object:

@Gentoli
Gentoli / broken.md
Last active September 19, 2022 15:46
Things didn't work as expected

Golang

  • Generic with pointer/value receiver is ambiguous

Google Cloud Functions

Go

  • no doc/cannot have a package as entrypoint, only root
  • register with functions.CloudEvent for different entry point but all dependencies will be build
@Gentoli
Gentoli / README.md
Last active December 6, 2022 03:45
OKD Rook (ocs) Setup

mgr plugin fails with

1

debug 2022-12-06T03:08:59.856+0000 7f183006f700  0 [rook ERROR rook.rook_cluster] No storage class exists matching configured Rook orchestrator storage class which currently is <local>. This storage class can be set in ceph config (mgr/rook/storage_class)
debug 2022-12-06T03:08:59.857+0000 7f183006f700  0 [rook ERROR orchestrator._interface] No storage class exists matching name provided in ceph config at mgr/rook/storage_class
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 125, in wrapper
    return OrchResult(f(*args, **kwargs))
  File "/usr/share/ceph/mgr/rook/module.py", line 229, in get_inventory
@Gentoli
Gentoli / downgrade.logs
Created January 25, 2023 08:02
OKD 4.11.0-0.okd-2023-01-14 -> 4.11.0-0.okd-2022-12-02
$ sudo /run/bin/machine-config-daemon pivot quay.io/openshift/okd-content@sha256:fa1104b5fd668474d8787ddde8de9d9a1cad86ff3d6b478d988e32b61e43415a
...
Downgraded:
aardvark-dns 1.4.0-1.fc36 -> 1.3.0-1.fc36
amd-gpu-firmware 20221214-145.fc36 -> 20221109-144.fc36
bash 5.2.15-1.fc36 -> 5.2.9-2.fc36
btrfs-progs 6.1-2.fc36 -> 6.0.2-1.fc36
clevis 18-10.fc36 -> 18-9.fc36
clevis-dracut 18-10.fc36 -> 18-9.fc36
clevis-luks 18-10.fc36 -> 18-9.fc36
@Gentoli
Gentoli / SSH-POD.md
Last active February 27, 2023 05:56
K8s SSH Pod

Allow inspecting host file system via ssh

Pod manifest (generated with ChatGPT, works)

apiVersion: v1
kind: Pod
metadata:
  name: alpine-ssh
spec:
  hostNetwork: true
@Gentoli
Gentoli / OKE_CILIUM.md
Last active July 3, 2023 10:35
OKE VCN Native Cilium

OKE @ v1.26.2 have OKE CNI without ipvlan. Native veth chaining works.

  • CNI Config (merged from /etc/cni/net.d/10-oci.conflist on the OS):
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cni-configuration
      namespace: cilium # same namespace as cilium (e.g. kube-system)
    data:
@Gentoli
Gentoli / gcp_oci.tf
Created July 6, 2023 06:18
GCP to OCI VPN Terraform
locals {
bgp_subnets = [
for i in range(2) : cidrsubnet("169.254.125.0/24", 7, i + 1) # skip range 0 to avoid 169.254.125.0
]
bgp_ip_ranges = [
for net in local.bgp_subnets : {
net = net
addrs = [for i in range(2) : cidrhost(net, i)]
}
@Gentoli
Gentoli / Ambient_Mesh_MicroK8s.md
Created July 21, 2023 06:02
Istio Ambient Mesh on MicroK8s
  • cni config folder is different
    • check existing cni for directory and volume mount and env var
@Gentoli
Gentoli / .md
Created May 16, 2024 06:38
IntelliJ AVD - The skin directory does not point to a valid skin.