Skip to content

Instantly share code, notes, and snippets.

View rmlandvreugd's full-sized avatar

R. Mathieu Landvreugd rmlandvreugd

View GitHub Profile

Using Sushy Tools with Libvirt

  • Add linux user to libvirt group
sudo usermod -a -G libvirt <your-user>
sudo -y install libvirt-devel gcc python3-devel
  • Login and validate user can execute virsh commands
@tashian
tashian / step-ca.json
Created January 26, 2021 22:00
Keycloak Client Settings for step-ca
{
"clientId": "step-ca",
"rootUrl": "http://127.0.0.1:10000",
"adminUrl": "http://127.0.0.1:10000",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1:10000/*"
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active June 27, 2025 08:37
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@wllmsash
wllmsash / assigning-static-ip-addresses-in-wsl2.md
Last active May 30, 2025 08:40
Assigning Static IP Addresses in WSL2

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

BGP

Document outling software architecture for integration of FRR into OVN for OCP and OSP. This is written in markdown for eventually addition as an enhancement proposal.

BGP Architectural Components

As we discuss use cases, we can start to distill them down to the building blocks necessary to achieve them. Some of these may be shared across multiple products.

BGP Speaker

A component capable of publishing routes only, called out separately as this may be simpler than (b) and (c)

BGP Routing Daemon

@aojea
aojea / Dockerfile
Last active April 3, 2025 11:17
Using crio runtime in KIND
ARG IMAGE=kindest/node
ARG VERSION=1.19
ARG MINOR=1
ARG OS=xUbuntu_20.04
FROM ${IMAGE}:v${VERSION}.${MINOR}
ARG VERSION
ARG OS
@blake
blake / create-envoy-systemd-template-unit.md
Last active July 29, 2024 03:13
systemd template unit for envoy

Create a systemd template unit for Envoy proxies with Consul

This brief tutorial will walk through the process of creating a systemd template unit file for starting Envoy sidecars for use with Consul service mesh.

Template unit files allow systemd to address multiple units from a single configuration file. You can call a systemd template unit file using a special format to use this feature:

@fredjoseph
fredjoseph / Zsh.md
Last active February 3, 2025 08:13
Zsh

Config files

To configure Zsh for your user’s session, you can use the following files:

  • $ZDOTDIR/.zshenv
  • $ZDOTDIR/.zprofile
  • $ZDOTDIR/.zshrc
  • $ZDOTDIR/.zlogin
  • $ZDOTDIR/.zlogout

By default, Zsh will try to find the user’s configuration files in the $HOME directory. You can change it by setting the environment variable $ZDOTDIR.

@mattetti
mattetti / newWindowsMachine.sh
Last active November 13, 2024 00:27
bash script to run from WSL to setup Windows and Linux from the linux side. To run: `wget https://gist.githubusercontent.com/mattetti/9807e2a1e654a7c00bb9c13f340fc39f/raw/ -O newMachineSetup.sh` and then `bash newMachineSetup.sh`
#!/bin/bash
export WINHOME=$(wslpath "$(wslvar USERPROFILE)")
# github username is needed to pull down the dot files
export GITHUBUSERNAME="mattetti"
# wininstall does an install using winget and checks that it went well
function wininstall {
echo "Installing $1";
cmd.exe /C winget.exe install -e $1;
@nkhitrov
nkhitrov / logger.py
Last active March 18, 2025 12:43
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat