Skip to content

Instantly share code, notes, and snippets.

View Drewlius's full-sized avatar
💭
Where did this all go wrong?

Drew Drewlius

💭
Where did this all go wrong?
View GitHub Profile

Using with Fish Shell


Conda's installer by default writes the init block to the ~/.bashrc or ~/.bash_profile by default - not fish's config. So fish never sources conda and it is therefor unavailable from the shell even if you restart the shell.

To solve this you can source where the conda package was installed. For me this time. it was installed to $HOME/miniconda3/bin this may not be the same every time so verify where it was installed. Here is a potential way to find it.Ls ~/miniconda3/bin/conda 2>/dev/null || ls ~/miniconda3/condabin/conda 2>/dev/null || find /home/slippy -maxdepth 4 -name conda -type f 2>/dev/null and run the executable ./miniconda3/bin/conda init fish

@Drewlius
Drewlius / HVAC-Maintenance-Report.html
Created September 7, 2026 01:42
HVAC Maintenance Report Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HVAC Maintenance Report</title>
<style>
:root { --ink:#15252d; --muted:#5d6c73; --line:#ccd5d8; --paper:#fff; --wash:#f2f6f6; --blue:#176b87; --good:#20845a; --watch:#d89b18; --action:#c34b42; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#dfe7e8; font:14px/1.4 Arial, Helvetica, sans-serif; }
@Drewlius
Drewlius / settings.json
Last active August 27, 2026 05:39
Remove MicroSlop Copilot VSCode Integration.
{
"github.copilot.enable": {
"*": false
},
"workbench.activityBar.visible": true,
"github.copilot.chat.localeOverride": "en",
"workbench.view.extension.copilot-chat": false,
"chat.enabled": false,
"github.copilot-chat.experimental.enableCodeEditor": false,
"github.copilot-chat.experimental.enableChat": false
@Drewlius
Drewlius / set-gpu-wattage.sh
Created August 1, 2026 15:13
NVIDIA-SMI interact-able to adjust GPU power limit on the fly
#!/bin/bash
printf "Set Temporary NVIDIA GPU Power Limit\n"
read -p "Enter wattage (RTX 5090 range: 400-600): " WATTS
if sudo nvidia-smi -pl "$WATTS"; then
printf "GPU power limit set to %s W.\n" "$WATTS"
else
printf "Error: NVIDIA rejected the requested power limit.\n"
exit 1
fi
@Drewlius
Drewlius / garuda-health
Last active July 17, 2026 19:37
Remove BTRFS and Snapper notifications from garuda-health on non BTRFS Garuda Linux installs file belongs in /usr/bin/garuda-health
#!/usr/bin/env python3
import filecmp
import os
from pathlib import Path
import pty
import re
import sys
import subprocess
import argparse
@Drewlius
Drewlius / adjacency_matrix.py
Created June 7, 2026 14:43
Adjacency Matrix path finder
INF = float('inf')
adj_matrix = [
[0, 5, 3, INF, 11, INF],
[5, 0, 1, INF, INF, 2],
[3, 1, 0, 1, 5, INF],
[INF, INF, 1, 0, 9, 3],
[11, INF, 5, 9, 0, INF],
[INF, 2, INF, 3, INF, 0],
]
@Drewlius
Drewlius / LuhnAlgorithm.py
Created June 4, 2026 12:27
Luhn Algorithm
def verify_card_number(nums):
card_numbers=[]
special_nums=[]
stripped=nums.replace(" ", "").replace("-", "")
for num in stripped:
card_numbers.append(int(num))
check_digit = card_numbers.pop(-1)
r_card_numbers = card_numbers[::-1]
for num in r_card_numbers[0::2]:
if num+num < 10:
@Drewlius
Drewlius / Zswapoff.sh
Created May 20, 2026 21:48
script to disable ZRAM and Swap in one command.
#!/bin/bash
sudo swapoff -a;sudo zramctl --reset /dev/zram0;echo "ensure if a ZRAM line is configured that you remove it now";sleep 10;wait;sudo nano /etc/fstab;sudo systemctl mask --now systemd-zram-setup@zram0.service;sudo touch /etc/systemd/zram-generator.conf;echo "Here you are going to write vm.swappiness=0, save(ctrl+s), and then exit(ctrl+x, Enter)";sleep 10;wait;sudo nano /etc/sysctl.d/99-swappiness.conf;echo "ZRAM is OFF";sleep 3;wait;exit 0
@Drewlius
Drewlius / Nvmon.sh
Created May 20, 2026 19:07
Interactive Nvidia GPU Monitoring Utility
#!/bin/bash
read -n1 -p "1:NVTOP 2:NVIDIA-SMI DMON 3:NVIDIA-SMI PMON > " c; echo
case $c in
1) nvtop ;;
2) read -n1 -p "1:FAST 2:SLOW > " d; echo
case $d in
1) nvidia-smi dmon -s u ;;
2) nvidia-smi dmon -d 1 ;;
esac
@Drewlius
Drewlius / BackupHomeDirectory.md
Last active September 25, 2026 09:40
[ $HOME, { ~/ }, /home/$USER ] Backup.sh

Backup Your Home Directory

So simple you mother could do it

This script expects you to have a secondary storage drive mounted in /mnt (/mnt/<Desired_Location>

This is not a strictly enforced requirement and you may edit the script to suit your needs.

Grant the script the permission to be executed

chmod +x ~/Home/Downloads/<backup-home.sh> (or wherever you saved it)  

Run the script in your preferred terminal via its absolute path