Skip to content

Instantly share code, notes, and snippets.

@noahbliss
noahbliss / keybase.md
Created July 30, 2019 16:41
Keybase Proof

Keybase proof

I hereby claim:

  • I am noahbliss on github.
  • I am noahbliss (https://keybase.io/noahbliss) on keybase.
  • I have a public key ASC7gX7UHlwn3oDZh8-DNMTVMYXdSEsGz3fEs0WxkfdqEwo

To claim this, I am signing this object:

@noahbliss
noahbliss / gist:a931fbc42ae48e6c3f82bc066dbbefce
Created July 30, 2019 16:49
Getting Lutris on Debian working
Install Debian stable
Upgrade debian stable to sid
install the nvidia driver from the nvidia website (for dxvk it needs a driver newer than the debian repos have)
if you have gnome, you will need to purge gdm and reinstall at least gdm, (likely gnome-core) to get it working.
LightDM is far more stable/dependable with the nvidia driver.
Install lutris (see their website for debian instructions)
Install wine staging from apt (wine-staging I think)
Install runners in lutris.
To get steam for linux working, run apt-get download steam
@noahbliss
noahbliss / vdevctl
Created July 30, 2019 16:50
Manages devices to be passed to a VM using directed IO.
#!/usr/bin/env sh
#Wooo only running ash... adventurous. ;P
#Noah Bliss -- 2017.10.22
thisdevice=$(cat /sys/class/dmi/id/product_uuid)
configdir=$HOME/system_configs
devinfofile=device_info.conf
devtmpfile=/tmp/alldevs.lst
devtmphostfile=/tmp/hostdevs.lst
alldevs=$(lspci -nn > $devtmpfile)
trap "{ rm -f $devtmpfile; rm -f $devtmphostfile;}" EXIT SIGINT SIGTERM
@noahbliss
noahbliss / ztrepo.sh
Created August 2, 2019 20:56
Patched zerotier installer for kali linux
#!/bin/bash
<<ENDOFSIGSTART=
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ENDOFSIGSTART=
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
#
@noahbliss
noahbliss / zshsnapfix.sh
Created October 17, 2019 13:33
Fix Snaps with ZSH (per user)
# anderssv on snapcraft forum
mkdir -p ~/.config/environment.d
echo "PATH=$PATH:/snap/bin\nXDG_DATA_DIRS=\"${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/lib/snapd/desktop\"" > ~/.config/environment.d/60-snap-icons-and-bin.conf
@noahbliss
noahbliss / macliketrackpad.txt
Created October 17, 2019 13:58
Mac-like trackpad settings. (no right click area, 2 finger click anywhere)
# For at least suse, the file to edit is "/usr/share/X11/xorg.conf.d/40-libinput.conf" restart display manager after changes.
# The important line to add is the ClickMethod one below. See https://wiki.archlinux.org/index.php/Libinput for more info.
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "On"
Option "ClickMethod" "clickfinger"
@noahbliss
noahbliss / opensuse-nvidiaupdate.sh
Created November 12, 2019 14:50
Signs kernel module of proprietary NVIDIA driver on OpenSUSE.
#!/usr/bin/env bash
nvidiafile="$1"
# For OpenSUSE systems that are securebooted.
# You need the package: kernel-devel
# You need your own signing key in mok.
# sudo su
# cd
# openssl req -new -x509 -newkey rsa:2048 -keyout gpusigningkey.pri -outform DER -out gpusigningkey.pub -nodes -days 36500 -subj "/CN=Graphics Drivers"
# mokutil --import gpusigningkey.pub
@noahbliss
noahbliss / proxprep.sh
Last active September 15, 2023 01:31
Proxmox Setup for General Dev Use
# Swap to free repo
wget -qO- https://gitlab.com/shebang/bashengine/raw/master/root/proxmox/aptfix | bash
apt update
apt upgrade -y
apt dist-upgrade -y
# Remove Nag. (Needs to be done after most upgrades that impact pve-manager)
cat <<EOF > /etc/apt/apt.conf.d/80pvenagfix
@noahbliss
noahbliss / keepmyjob.sh
Last active January 6, 2021 20:08
Backup and restore interfaces file and reboot system if not canceled.
#!/usr/bin/env bash
# Noah Bliss
# GPLv3 License
# Backup and restore interfaces file and reboot system if not canceled.
# This program will hang the terminal. I prefer it that way and use tmux in a split window.
file="/etc/network/interfaces"
backup="/etc/network/interfaces.safe"
echo "Backing up $file to $backup"
if ! cp "$file" "$backup"; then echo "Failed to backup"; exit 1; fi
# If we have inotifywait, use it.
@noahbliss
noahbliss / gawk-rshell.sh
Created July 15, 2020 21:48
gawk-rshell.sh
#!/usr/bin/gawk -f
BEGIN {
Port = 8080
Prompt = "bkd> "
Service = "/inet/tcp/" Port "/0/0"
while (1) {
do {
printf Prompt |& Service