Skip to content

Instantly share code, notes, and snippets.

@LeoDog896
LeoDog896 / TEXT.md
Last active February 16, 2022 13:26
USB 3.0 ports not working? (Minus Forum -- may or may not work for devices)

How to fix USB Ports and internet on AMD CPUs

  1. Disable IOMMU in your BIOS
  2. In /etc/default/grub, add "iommu=soft" to GRUB_CMD_LINUX (if there is already content in there, ex "rhgb quiet", append iommu=soft to it, EX GRUB_CMD_LINUX="rhgb quiet iommu=soft")

Why?

Krister explains the changes really well in his blog

@LeoDog896
LeoDog896 / types.ts
Created February 17, 2022 13:45
Detailed TypeScript definitions designed to align with the schema.
type DisplayType = "fullscreen" | "standalone" | "minimal-ui" | "browser"
interface WebManifest {
background_color?: string;
categories?: string[];
description?: string;
dir?: "ltr" | "rtl" | "auto"
display?: DisplayType;
display_override?: [DisplayType];
iarc_rating_id?: string;
@LeoDog896
LeoDog896 / README.md
Created February 26, 2022 19:53
No drive found (linux installer)? Try this!

Find a SATA Operations option in your BIOS, and change it from RAID to SATA (NOT None).

@LeoDog896
LeoDog896 / README.md
Created January 2, 2022 16:48
Fedora Workstation: Minecraft on Java 8 not running? Here's how to fix it.

If you're getting the error IndexOutOfBoundsException - LinuxDisplay#getAvailableDisplayModes, run:

sudo dnf install xrandr (install the xrandr package)

It's a required library for LWJGL.

@LeoDog896
LeoDog896 / README.md
Last active June 3, 2022 11:25
# Weird `no-pre-gyp` errors? Do this!

Simply do npm i -g request node-pre-gyp and it'l be fixed!

@LeoDog896
LeoDog896 / CameraMovement.gd
Created July 22, 2022 15:50
Camera transition
extends Camera
export var target: Transform
# If the transition is active
export var active := true
# Strength of the transition
export var strength: float = 1
# The "from" transition to transition from
onready var starting_transform := self.transform
var time: float = 0.0
func _physics_process(delta: float) -> void:
@LeoDog896
LeoDog896 / index.ts
Last active August 5, 2022 15:38
Recursively read a directory in Deno
import { join } from "https://deno.land/std/path/mod.ts";
export async function* recursiveReaddir(
path: string
): AsyncGenerator<string, void> {
for await (const dirEntry of Deno.readDir(path)) {
if (dirEntry.isDirectory) {
yield* recursiveReaddir(join(path, dirEntry.name));
} else if (dirEntry.isFile) {
yield join(path, dirEntry.name);
@LeoDog896
LeoDog896 / README.md
Created December 16, 2022 17:17
How to clear HSTS settings from chrome
  1. Navigate to chrome://net-internals/#hsts

  2. Go to Query HSTS/PKP domain and ensure that the domain exists (ex github.com or google.com).

  3. Scroll down to Delete domain security policies and enter that domain

Finished!

@LeoDog896
LeoDog896 / starship.toml
Created December 31, 2022 19:47
my starship config that i blatantly stole from someone else thanks kiel
format = """
[┌](bold green)$status$cmd_duration$fill
[│ ](bold green)$hostname$localip$time$nix_shell
[│ ](bold green)$java$kotlin$rust$golang$python
[│ ](bold green)$sudo$username$directory$package$git_branch$git_commit$git_state
[└─>](bold green) """
[fill]
symbol = "─"
@LeoDog896
LeoDog896 / parcel-init.sh
Created December 31, 2022 00:11
parcel-init
JSON=$(cat <<EOF
{
"private": true,
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html --public-url ./",
"format": "prettier --write ."
},
"dependencies": {