Skip to content

Instantly share code, notes, and snippets.

View Sadin's full-sized avatar
👽
Go

Zach Snyder Sadin

👽
Go
View GitHub Profile
@Sadin
Sadin / nvidia-installer.sh
Created February 27, 2022 15:44 — forked from GloriousEggroll/nvidia-installer.sh
nvidia /etc/profile.d/ script
#!/bin/bash
#
# Nvidia GPU detector
nvgpu=$(lspci | grep -i nvidia | grep -i vga | cut -d ":" -f 3)
nvkernmod=$(lspci -v | grep -i 'kernel driver' | grep -i nvidia)
DISPLAY_CHECK=$(echo $DISPLAY)
# Don't run if there's no display -- in case logging in headless.
if [[ -z $DISPLAY_CHECK ]]; then
@Sadin
Sadin / qoi.rs
Created November 25, 2021 15:31 — forked from ChevyRay/qoi.rs
QOI - Quote OK Image Format (Rust Port)
const INDEX: u8 = 0x0;
const RUN_8: u8 = 0x40;
const RUN_16: u8 = 0x60;
const DIFF_8: u8 = 0x80;
const DIFF_16: u8 = 0xc0;
const DIFF_24: u8 = 0xe0;
const COLOR: u8 = 0xf0;
const MASK_2: u8 = 0xc0;
const MASK_3: u8 = 0xe0;
@Sadin
Sadin / gist:2158852
Created March 22, 2012 15:01
Archlinux MirrorList
##
## Arch Linux repository mirrorlist
## Generated on 2012-03-22
##
## United States
#Server = http://archlinux.supsec.org/$repo/os/$arch
#Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch
#Server = http://archlinux.tserver.net/$repo/os/$arch
#Server = http://cake.lib.fit.edu/archlinux/$repo/os/$arch
# Dentech Kill Switch
# 5-16-19
# Microsoft cant decide on one way to do things, so lets try all three.
# Get|Stop method
Clear-Host
Get-Process dtwin | Stop-process
# Name mthod
Clear-Host
@Sadin
Sadin / installing-oh-my-zsh-fedora.md
Last active April 4, 2018 20:14 — forked from jshcrowthe/installing-oh-my-zsh-fedora.md
Installing Oh My ZSH oh Fedora 25+

Installing oh-my-zsh on Fedora

Oh-my-zsh is an extension of the traditional z shell that is extensible via community created plugins (Plugins found here: oh-my-zsh github repo). It is, in my opinion, a breath of fresh air in comparison to the traditional bash shell.

DO THE FOLLOWING IN ORDER

Installing ZSH (using dnf)

The first step for this install is getting zsh we will do this via yum. From your terminal:

@Sadin
Sadin / fstab-generate-arch
Created January 3, 2018 06:32 — forked from Brainiarc7/fstab-generate-arch.md
Generate fstab in Arch Linux
First, install arch-install-scripts:
sudo pacman -S --needed arch-install-scripts
Secondly, mount your partitions in all the internal hard drives.
Thirdly, generate and validate your config by piping it out to stdout:
genfstab -U -p / | less

Keybase proof

I hereby claim:

  • I am sadin on github.
  • I am zsnyder (https://keybase.io/zsnyder) on keybase.
  • I have a public key ASD_hs9jGbCDk5ey2V9j1M7nagJeW1LlIxqu7M910_fR-Ao

To claim this, I am signing this object:

body{
background:#17202A;
color:#F5EEF8;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Landing page for AVA">
<meta name="author" content="Zachary Snyder">
<link rel="icon" href="../../favicon.ico">
<title>Astro Vinyl Art</title>
#!/bin/sh
# 02:00.0 is the pci-bus of my graphics card and 02:00.1 its sound bus
DEVS="0000:02:00.0 0000:02:00.1"
for DEV in $DEVS; do
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
done
modprobe -i vfio-pci