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 / 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
@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 / Error.txt
Last active February 26, 2016 02:53 — forked from Argygle/minesweeper
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at Minesweeper.main(Minesweeper.java:14)
@Sadin
Sadin / powerball
Last active November 17, 2015 01:42 — forked from Argygle/powerball
public class PowerBall {
public static void main(String[] args) {
// int lottery[];
for ( int i = 10; i>= 1; i-- ) {
System.out.println( i );
}
// CSS
body {
background: url('../img/bg_dark.jpg');
font-family: Ubuntu, Helvetica, sans-serif;
color: #E8E8E8;
}
a, a:active, a:visited {
color: #E8E8E8;
text-decoration: none;
font-weight: bold;