Skip to content

Instantly share code, notes, and snippets.

kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: vm-network-limit
namespace: <username>-dev
spec:
podSelector:
matchLabels:
kubevirt.io: virt-launcher
egress:
@leogallego
leogallego / profile
Created April 16, 2025 20:12
bash functions for easy alias of podman with ansible ee
function eecol {
podman run -it --rm "$@" ansible-galaxy collection list
}
function eecore {
podman run -it --rm "$@" ansible --version
}
function eebash {
podman run -it "$@" bash
}
---
- name: Instruqt AAP Setup
hosts: localhost
become: false
gather_facts: false
collections:
- ansible.controller
vars:
@leogallego
leogallego / gitconfig
Created May 10, 2021 19:37
git graph tree in cli with changes
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
@leogallego
leogallego / etc-pulse-default.pa
Last active March 15, 2021 17:11
white noise speaker when idle pulse audio linux
White noise is caused by the suspend-on-idle for some speakers.
]$ sudo vim /etc/pulse/default.pa
### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
@leogallego
leogallego / wacom-one-small-dual-monitor-nvidia.txt
Last active March 5, 2021 18:54
wacom one small dual monitor nvidia propietary driver
## list screens / monitors
~]$ xrandr
Screen 0: minimum 8 x 8, current 3640 x 1920, maximum 32767 x 32767
DVI-D-0 connected 1080x1920+0+0 left (normal left inverted right x axis y axis) 475mm x 267mm
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 2560x1080+1080+0 (normal left inverted right x axis y axis) 673mm x 284mm
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
@leogallego
leogallego / gist:ef00d7667b2ba221f444b4aea35749c8
Created February 14, 2021 21:16
wacom one tablet linux dual monitor setup
### Requirements ###
* X Server 1.8 or later
* xf86-input-wacom-0.10.9 or later
## MapToOutput ##
Tip: The '''MapToOutput''' [[xsetwacom]] parameter requires at least xf86-input-wacom-0.11.99.1 to work with the NVIDIA binary driver. See [[Coordinate Transformation Matrix|Dual-and-Multi-Monitor-Set-Up#coordinate-transformation-matrix|]] instead.
The wacom driver does not support multi-monitor setups directly - handling of such setups is handled by the X Server. [[xsetwacom]] does however provide a parameter to easily map a tablet to a screen
@leogallego
leogallego / readme.md
Created February 6, 2021 18:22 — forked from rometsch/BH456A_linux_driver.md
MPOW BH456A Bluetooth USB Adapter Kernel Module Adjustements (Realtek RTL8761B chip)

Problem

The MPOW Bluetooth 5 dongle (Model: BH456A) does not work out of the box on Ubuntu 20.04 (kernel 5.4.0-42).

Solution

Patch the bluetooth kernel module and copy the firmware binaries to /lib/firmware.

Copy the fimware

https://github.com/Pulse-Eight/libcec/blob/master/docs/README.linux.md
---
AOCEC
Pass the argument -DHAVE_AOCEC_API=1 to the cmake command in the compilation instructions:
cmake -DHAVE_AOCEC_API=1 ..
---
Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "MiddleEmulation" "true"
Option "HorizontalScrolling" "false"
Option "ButtonMapping" "3 9 1 4 5 6 7 2 8"
# Option "ButtonMapping" "3 9 1 4 5 6 7 2 8" // left hand - SR scroll, LL+LR fwd, SL mid click