Skip to content

Instantly share code, notes, and snippets.

View Binsk's full-sized avatar

Reuben Shea Binsk

View GitHub Profile
@kikislater
kikislater / tlp.conf
Last active February 10, 2025 07:56
TLP for Lenovo Thinkpad P14s Gen 5 AMD (Works with T14 Gen 5 as well)
################################################################################
########### 2024 July 03 - TLP P14s Gen 5 AMD by Sylvain POULAIN ###############
################################################################################
# Content of /etc/tlp.d/tlp.conf for P14s Gen 5 AMD
# (Also works with T14 Gen 5 : same hardware, same motherboard)
################################################################################
# Complete harware list => https://linux-hardware.org/?probe=1c547a828f
################################################################################
# /!\ For better performance use "acpi.ec_no_wakeup=1" in Kernel option
# https://patchwork.kernel.org/project/linux-acpi/patch/ZnFYpWHJ5Ml724Nv@ohnotp/
@damico
damico / test-rocm.py
Created April 10, 2023 18:54
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@tkolo
tkolo / guide.md
Last active June 27, 2024 16:46
eGPU passthrough to VM for Pop!_OS/Ubuntu

Adapted from Arch wiki

Prerequisites

hardware

The extrnal monitor has to be attached to eGPU, not laptop. Otherwise this won't work.

libvirt & virt-manager

Install virt manager:

sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

@natrim
natrim / convert.sh
Last active February 20, 2025 23:19
Simple conversion script that converts Godot html5 export to gzipped version, with decompressing wasm and pck files using pako
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
game="$1"
fi
@DeXP
DeXP / pmx20.md
Created February 28, 2015 11:21
PMX (Polygon Model eXtended) 2.0 File Format Specifications

Copy from: https://gist.github.com/felixjones/f8a06bd48f9da9a4539f

PMX (Polygon Model eXtended) 2.0

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

PMX files must be read in binary mode as EOF markers may appear in the middle of the file.

@felixjones
felixjones / pmx21.md
Last active April 20, 2025 12:48
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active May 6, 2025 19:44
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 2, 2025 15:44
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;