Skip to content

Instantly share code, notes, and snippets.

View jvandenbroek's full-sized avatar

Joost van den Broek jvandenbroek

  • The Netherlands
View GitHub Profile
@z0mb1e-kgd
z0mb1e-kgd / reresolve-dns.ps1
Created February 18, 2022 20:25
Wireguard reresolve-dns Powershell script for Windows
# Copyright (C) 2021 Max Schulze. All Rights Reserved.
# near-literal Translation of the linux version by Jason A. Donenfeld
# to decrypt the dpapi Credentials, you have to be the same user as the wireguard tunnel service, i.e. "nt authority\system", check with "whoami"
# this script might be called by task scheduler as
# powershell -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -Command "Get-ChildItem -File 'c:\Program Files\wireguard\data\configurations\*.dpapi' | foreach {& C:\<path to script>\wireguard_reresolve-dns.ps1 $_.FullName}"
# if you want to try it in cmd, remember to elevate the user, i.e. with psexec from sysutils
# psexec -s -i powershell -NoPr...
Set-StrictMode -Version 3
@krisek
krisek / alert.rules.yml
Last active July 16, 2024 07:49
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
diff --git a/Action.c b/Action.c
index 9a7c3c5..72229a1 100644
--- a/Action.c
+++ b/Action.c
@@ -406,7 +406,7 @@ static Htop_Reaction actionRedraw() {
}
static const struct { const char* key; const char* info; } helpLeft[] = {
- { .key = " Arrows: ", .info = "scroll process list" },
+ { .key = " hjkl: ", .info = "scroll process list" },
@MakiseKurisu
MakiseKurisu / pmxcfs.sh
Last active January 30, 2024 12:11
Mount pmxcfs
mkdir ./mnt
mount /dev/pve/root ./mnt
cd mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
cd ..
chroot ./mnt ./bin/bash
pmxcfs
/bin/nano /etc/pve/nodes/{node name}/qemu-server/100.conf
@Someguy123
Someguy123 / deswappify.pl
Last active February 11, 2024 19:34 — forked from WGH-/deswappify.pl
#!/usr/bin/perl
use strict;
use Fcntl qw(SEEK_SET);
sub deswappify {
my $pid = shift;
my $fh = undef;
my $start_addr;
@Informatic
Informatic / domain.xml
Last active July 3, 2024 18:08
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@j-jith
j-jith / miui-fastboot-howto.rst
Last active May 17, 2024 11:34
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux

@wavezhang
wavezhang / java_download.sh
Last active July 19, 2024 13:45
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@umpirsky
umpirsky / A.markdown
Last active August 3, 2023 18:14 — forked from olivierlacan/An_example.markdown
Sublime Text Monokai Sidebar Theme.
@mattratleph
mattratleph / vimdiff.md
Last active July 18, 2024 15:03 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)