Skip to content

Instantly share code, notes, and snippets.

View Berny23's full-sized avatar
😛
https://youtu.be/dQw4w9WgXcQ

Berny23 Berny23

😛
https://youtu.be/dQw4w9WgXcQ
View GitHub Profile
#!/bin/sh
sed -i s/bismuthEnabled=true/bismuthEnabled=false/ ~/.config/kwinrc
dbus-send --session --print-reply=literal --dest="org.kde.KWin" "/Scripting" "org.kde.kwin.Scripting.start"
sed -i s/bismuthEnabled=false/bismuthEnabled=true/ ~/.config/kwinrc
dbus-send --session --print-reply=literal --dest="org.kde.KWin" "/Scripting" "org.kde.kwin.Scripting.start"
@Berny23
Berny23 / tiny11.xml
Last active February 1, 2024 19:21
KVM QEMU Single NVIDIA GPU Passthrough with Kubuntu Host and Windows 11 Guest (virt-manager XML config for Windows 11 or Tiny11)
<domain type="kvm">
<name>Tiny11</name>
<uuid>8f289ec0-40bf-4312-b916-b787dd7f6c0e</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/11"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">16777216</memory>
<currentMemory unit="KiB">16777216</currentMemory>
@Berny23
Berny23 / revert.sh
Last active March 14, 2024 18:14
KVM QEMU Single NVIDIA GPU Passthrough with Kubuntu Host and Windows 11 Guest (/etc/libvirt/hooks/qemu.d/<VM-NAME>/release/end/revert.sh)
#!/bin/bash
set -x
# Reload GPU kernel modules
modprobe nvidia
modprobe nvidia_modeset
modprobe nvidia_uvm
modprobe nvidia_drm
# Reload mainboard audio controller kernel modules
@Berny23
Berny23 / start.sh
Last active March 14, 2024 18:12
KVM QEMU Single NVIDIA GPU Passthrough with Kubuntu Host and Windows 11 Guest (/etc/libvirt/hooks/qemu.d/<VM-NAME>/prepare/begin/start.sh)
#!/bin/bash
# Helpful to read output when debugging
set -x
# Stop display manager
systemctl stop display-manager.service
# Specific to KDE Plasma under Wayland (put your username in here instead of berny23)
systemctl --user -M berny23@ stop plasma-*
// Kopieren des aktuellen Namens, wenn Master-Button geklickt wird.
// Muss nur einmal ausgeführt werden, sobald auf den Reiter "Sammeln" geklickt wurde.
var lastName = getCurrentSetName();
$('select#setauswahl').on('change', function() {
lastName = getCurrentSetName();
console.log(lastName);
//setTimeout(async() => await navigator.clipboard.writeText(finalName), 3000);
});
@Berny23
Berny23 / JS Snippet - Bing Chat (Fix for Dark Reader Extension).js
Last active February 19, 2023 10:38
JS Snippet - Bing Chat (Fix for Dark Reader Extension)
/*
Removes and fixes backgrounds inside shadow DOM for dark mode to work better (no more forced white background).
Applicable for https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx
*/
var sheetBg = new CSSStyleSheet
sheetBg.replaceSync( `div.image { display: none !important; }`)
var sheetMsg = new CSSStyleSheet
sheetMsg.replaceSync( `cib-message { background: #fff; color: #000; }`)
@Berny23
Berny23 / JS Snippet - Alle TA annehmen + Alle Karten auswählen (Zauberhogwarts).js
Last active December 7, 2023 20:54
JS Snippet - Alle TA annehmen + Alle Karten auswählen (Zauberhogwarts)
/*
Zauberhogwarts: Auto-TA + Card-Selector
Copyright © 2023 Berny23
This file is released under the "MIT" license.
Go to "https://choosealicense.com/licenses/mit" for full license details.
*/
// Alle TA annehmen/bestätigen:
@Berny23
Berny23 / TumblThree_BackupViewer.html
Created August 2, 2021 01:19
TumblThree Backup Viewer
<!--
TumblThree Backup Viewer
Copyright © 2021 Berny23
This file is released under the "MIT" license.
Go to "https://choosealicense.com/licenses/mit" for full license details.
-->
<html>
<head>
@Berny23
Berny23 / gameoflife.py
Created May 25, 2021 16:55
Game of Life Simulation (written in Python 3.9, needs "pygame" library)
# Game of Life Simulation
# Copyright © 2021 Berny23
#
# This file is released under the "MIT" license.
# Go to "https://choosealicense.com/licenses/mit" for full license details.
import pygame as game
import random
######## CONFIG ###########
@Berny23
Berny23 / tw3facts.txt
Created September 13, 2020 19:24
The Witcher 3 - Facts (Mirror)
The Witcher 3 - Facts
Source: http://www.vertigofx.com/public/games/tw3/tw3facts.txt
== dlc/bob/data/gameplay/community/dialogues/chats/chat_beauclair_citizens_01.w2scene:
lw_ww_geralt_of_rivia_wine
== dlc/bob/data/gameplay/community/dialogues/chats/chat_beauclair_citizens_02.w2scene:
mq7015_done