Skip to content

Instantly share code, notes, and snippets.

View genbtc's full-sized avatar

genBTC genbtc

  • NJ, USA
View GitHub Profile
@genbtc
genbtc / github-links-all.txt
Created January 13, 2023 00:10
github-links-all.txt
@genbtc
genbtc / genr8-chroot.bash
Last active January 17, 2025 11:09
gentoo-chroot.bash
#!/usr/bin/env bash
#
# Shamelessly "borrowed" from Arch to make Gentoo development in chroots easier;
# Thanks for doing all of the hard work! -@Kangie, 2022
# subsequently modified by @genr8eofl, 2023
#
#
# Options:
# -d | --debug
# -f | --no-bind-distfiles | NO_MOUNT_DISTFILES
@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.