Skip to content

Instantly share code, notes, and snippets.

View PostboxRetinal's full-sized avatar
🎯
Focusing

Sebastian Balanta PostboxRetinal

🎯
Focusing
  • Colombia
  • 04:03 (UTC -05:00)
View GitHub Profile
@plembo
plembo / nmbrnetkvm.md
Last active April 4, 2025 16:38
NetworkManager bridged network for KVM guests

Setting up a bridged network for KVM guests

This will work with either networkd or NetworkManager as a resolver. In fact, this is the only way to do bridged KVM (libvirtd) networking with NetworkManager.

If you're using NetworkManager (on a desktop or laptop, for example) on your KVM host, follow these instructions to set up a bridge interface.

Once you have the host bridge set up, proceed as follows:

  1. Create a bridge network device inside KVM. Edit and save the below text as file host-bridge.xml:
@plembo
plembo / addbr0ubunmcli.md
Last active May 16, 2025 07:07
Add br0 to Ubuntu desktop using nmcli

Add a bridge interface to Ubuntu desktop using nmcli

Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.

In the examples below "eth0" is the name of my physical interface. By default on Ubuntu and most distributions that will almost certainly be different, for example: "eno1", "ens1", or "enp2s0".

To see what everything looks like before starting:

@xtrcode
xtrcode / hid_usb.ino.c
Created May 12, 2019 16:54
DigiSpark ATtiny85 Example payload for the german keyboard layout to automatically open a terminal (i3wm) and visit a website.
//This the important part, include the De suffixed version instead of the normal one and the rest goes same as the original lib.
// see: https://github.com/adnan-alhomssi/DigistumpArduinoDe
#include "DigiKeyboardDe.h"
int LOOP = 0;
char *payload = "xdg-open https://www.youtube.com/watch?v=dQw4w9WgXcQ & exit";
void setup() {
DigiKeyboard.delay(2000);