Skip to content

Instantly share code, notes, and snippets.

View genbtc's full-sized avatar

genBTC genbtc

  • NJ, USA
View GitHub Profile
@genbtc
genbtc / tmpkernel-delete-these-dirs.txt
Created November 6, 2022 17:58
/tmp/kernel-delete-these-dirs.txt
# Directories I don't want and have no use for (under /usr/src/linux tree)
#These dirs should be dealt with in the following way:
# foreach loop
# rename the Kconfig file in the dir to .bak
# mv $1Kconfig{,.bak}
# rewrite it as a blank file so it will dead-end safely.
# touch $1Kconfig
# Do NOT use this list before reading/checking for things you use first.
drivers/accessibility/
@genbtc
genbtc / tmpkernel-keep-these-dirs.txt
Created November 6, 2022 17:53
/tmp/kernel-keep-these-dirs.txt
#These are the only directories I need under /usr/src/linux tree.
#These files should be kept, everything else can get lost.
arch/Kconfig
arch/x86/events/Kconfig
arch/x86/Kconfig
arch/x86/Kconfig.assembler
arch/x86/Kconfig.cpu
arch/x86/Kconfig.debug
arch/x86/kvm/Kconfig
arch/x86/xen/Kconfig
@genbtc
genbtc / homegenr8eoflmake.conf-template
Created September 17, 2022 18:40
/home/genr8eofl/make.conf-template
#The master file is located @ /usr/share/portage/config/make.globals
#genr8eofl has known and loved many make.conf scripts but this one is mine forever. (C) 2021 & 2022.
#COMMON_FLAGS="-O2 -pipe -march=native" #(cpu arch=zen is more descriptive)
COMMON_FLAGS="-march=znver3 -mshstk -fdiagnostics-color=always -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS} -D_GLIBCXX_ASSERTIONS"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3"
@genbtc
genbtc / homegenr8eoflgentoo-all-profiles-USE-flags-Sept0322.txt
Created September 3, 2022 04:25
/home/genr8eofl/gentoo-all-profiles-USE-flags-Sept0322.txt
default/linux/amd64/17.1: xattr split-usr crypt ipv6 ncurses nls pam readline ssl zlib fortran openmp seccomp cli pcre dri iconv libtirpc multilib bzip2 acl gdbm nptl unicode
default/linux/amd64/17.1/selinux: xattr split-usr crypt ipv6 ncurses nls pam readline ssl zlib fortran openmp seccomp cli pcre dri iconv libtirpc multilib bzip2 acl gdbm nptl unicode selinux
default/linux/amd64/17.1/hardened: xattr split-usr crypt ipv6 ncurses nls pam readline ssl zlib openmp seccomp pcre iconv libtirpc multilib bzip2 acl nptl unicode hardened pic xtpax -jit -orc -ptpax -berkdb -gdbm -fortran -cli
-dri
default/linux/amd64/17.1/hardened/selinux: xattr split-usr crypt ipv6 ncurses nls pam readline ssl zlib openmp seccomp pcre iconv libtirpc multilib bzip2 acl nptl unicode hardened pic xtpax -jit -orc -ptpax -berkdb -gdbm
-fortran -cli -dri selinux
@genbtc
genbtc / homegenr8eoflselinux-ALL-interfaces-names.txt
Created August 29, 2022 23:59
/home/genr8eofl/selinux-ALL-interfaces-names.txt
abrt_dbus_chat
abrt_domtrans
abrt_domtrans_helper
abrt_exec
abrt_manage_cache
abrt_manage_pid_files
abrt_manage_runtime_files
abrt_read_config
abrt_read_log
abrt_read_pid_files
@genbtc
genbtc / homegenr8eoflselinux-ALL-templates-functionnames.txt
Created August 29, 2022 23:59
/home/genr8eofl/selinux-ALL-templates-functionnames.txt
apache_role( role_prefix , user_domain , user_exec_domain , role )
auth_role( role_prefix , user_domain , user_exec_domain , role )
bluetooth_role( role_prefix , user_domain , user_exec_domain , role )
cdrecord_role( role_prefix , user_domain , user_exec_domain , role )
ceph_domain_template( cephdaemon )
cfengine_domain_template( domain_prefix )
chromium_role( role_prefix , user_domain , user_exec_domain , role )
condor_domain_template( domain_prefix )
container_base_role( role_prefix , user_domain , user_exec_domain , role )
container_domain_template( domain_prefix )
@genbtc
genbtc / gnome42-darkmode.sh
Created August 29, 2022 15:54
gnome42-darkmode.sh
#!/bin/sh
#Gnome 42 has a new System Wide Dark Mode, but XFCE has no slider for it so:
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
@genbtc
genbtc / doas-persist.txt
Last active August 29, 2022 15:48
doas-persist.txt
// SPDX-License-Identifier: CC-BY-SA 4.0
// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
/* an investigation into doas persist, by genBTC @C 2022 Aug */
Doas "persist":
================
"Note: Due to OpenBSD-specific kernel API required by doas to set and clear timeouts, the persist feature is disabled by default in the OpenDoas port."
^-- Hmm, shouldnt we be able to add this support into the linux kernel if we take their code and wrap it in a linux module that logs the timestamp or whatever?
we investigate.
@genbtc
genbtc / my-nvmequirk.patch
Created August 29, 2022 13:51
my-nvmequirk.patch
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index ce129655e..44892732d 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2941,7 +2941,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (result)
goto release_mempool;
- dev_info(dev->ctrl.device, "pci function %s\n", dev_name(&pdev->dev));
+ dev_info(dev->ctrl.device, "pci function address: %s\n", dev_name(&pdev->dev));
@genbtc
genbtc / DocumentsGentoo-installation-instructions.txt
Created August 29, 2022 13:51
Documents/Gentoo-installation-instructions.txt
Download a Minimal Install cd (generic)
https://www.gentoo.org/downloads/
or
https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/20220217T125149Z/install-amd64-minimal-20220217T125149Z.iso
Boot your computer/VM with the minimal ISO
Create the disk partitions
# gdisk /dev/sda