Skip to content

Instantly share code, notes, and snippets.

View RealityAnomaly's full-sized avatar

Vertex RealityAnomaly

  • United Corporate Trusts of Britain
  • 07:25 (UTC +01:00)
View GitHub Profile
@RealityAnomaly
RealityAnomaly / esxcli-software-patched.py
Last active January 4, 2024 10:55
esxcli-software-patched.py
import shutil
import subprocess
import tempfile
import sys
# example use: python3 ./patch.py vib.install -v /vmfs/volumes/65790f67-650d4902-c890-d0431e4ede0e/BCM_bootbank_dell-shared-perc8_06.806.92.00-1OEM.700.1.0.15843807.vib -f --dryrun
patch_data = '''
# start of patch area
import inspect
@RealityAnomaly
RealityAnomaly / imessage.txt
Created January 1, 2024 15:11
imessage.txt
APKTIDb9QuTtosrfTl377XkBTM6MgMcYUnqTuyG7wQ1j4my76wsg
@RealityAnomaly
RealityAnomaly / talos-kernel-stuff.md
Created November 30, 2021 18:54
Adding a proprietary kernel module to Talos OS

Adding a proprietary kernel module to Talos OS

  1. Patching and building the kernel image
    1. Clone the pkgs repository from Github and check out the revision corresponding to your version of Talos OS
      git clone https://github.com/talos-systems/pkgs pkgs && cd pkgs
      git checkout v0.8.0
    2. Clone the Linux kernel and check out the revision that pkgs uses (this can be found in kernel/kernel-prepare/pkg.yaml and it will be something like the following: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-x.xx.x.tar.xz)
#!/usr/bin/env python3
# Wrapper for `nix` commands that automatically override flake input paths
# via use of the special environment variables NIX_FLAKE_PATH_OVERRIDES and NIX_FLAKE_URL_OVERRIDES
import os
import sys
import json
import subprocess
from typing import List, Set, Mapping
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index f85bcf35..d10fa415 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1527,6 +1527,11 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
if (!(i = nl_checkin(h, sizeof(*i))))
return;
+ /* Always skip FIB exception routes */
+ if (i->rtm_flags & RTM_F_CLONED) {
@RealityAnomaly
RealityAnomaly / tpm_zfs.sh
Last active March 18, 2023 15:49
Very specific script to unlock a ZFS volume with a key stored in a TPM 1.2
#!/bin/bash
# Copyright 2020 Joseph Marsden
# This is very specific to my setup and will probably not work on yours.
wrap_key() {
echo "Please enter the volume key"
read -s -p "Key: " KEY && echo -e "\n"
if [ -z $KEY ]; then
# key is blank, so generate one
@RealityAnomaly
RealityAnomaly / nvmgr.py
Created January 9, 2020 16:39
GPU Switcher v2
#!/bin/python3
import os
import sys
import time
import libvirt
import argparse
import subprocess
from primesel import Switcher
NVIDIA_PCI_ID = '0000:01:00.0'
@RealityAnomaly
RealityAnomaly / nvmgr.py
Created January 9, 2020 01:14
GPU Switcher
#!/bin/python3
import os
import sys
import time
import argparse
import subprocess
from primesel import Switcher
nvidia_modules = [
'nvidia_uvm',

Keybase proof

I hereby claim:

  • I am citadelcore on github.
  • I am citadelcore (https://keybase.io/citadelcore) on keybase.
  • I have a public key ASAirhMQU145c6eWRaPggVopLwAHHtpr4S1tVV7DyPISLgo

To claim this, I am signing this object:

@RealityAnomaly
RealityAnomaly / FileProvider.cs
Created September 26, 2018 16:14
my terrible code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.XPath;
using System.IO;
using System.Security.Cryptography;