Skip to content

Instantly share code, notes, and snippets.

View LeagueRaINi's full-sized avatar
🏠
Working from home

RaINi_ LeagueRaINi

🏠
Working from home
  • Germany
  • 04:41 (UTC +01:00)
View GitHub Profile
@LeagueRaINi
LeagueRaINi / main.rs
Created December 28, 2023 01:53
Basic attempt at detecting what fsr version a game is using
#[macro_use] extern crate lazy_static;
use std::env::args;
use std::path::Path;
use std::{fmt, fs};
use anyhow::{bail, Context, Result};
use regex::bytes::Regex;
use walkdir::WalkDir;
@LeagueRaINi
LeagueRaINi / docker-compose.yml
Last active November 20, 2023 02:11
docker compose file that spins up all services necessary to get a basic jellyfin instance up and running
version: "3.8"
# set the environment variable DATA_ROOT to specify where all the files are going to end up
x-environment: &common-env
TZ: Europe/Berlin # CHANGE!
PUID: 1000
PGID: 1000
services:
@LeagueRaINi
LeagueRaINi / gog_thumbnails.rs
Created November 11, 2023 21:05
Scans the gog webcache folder for corrupt images and tries to download them again
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use std::ffi::OsStr;
use std::os::windows::fs::MetadataExt;
use std::sync::Arc;
use indicatif::{ProgressBar, ProgressStyle};
use log::{error, info, warn};
use reqwest::Client;
use tokio::sync::Semaphore;
@LeagueRaINi
LeagueRaINi / llama_win_rocm.bat
Created September 12, 2023 16:19
Clones and compiles llama.cpp with the rocm windows sdk for amd gpu acceleration on windows! yay!
@echo off
:: Path to the bin directory of the rocm windows sdk (change path if necessary),
:: set ROCM_BIN=C:\Program Files\AMD\ROCm\5.5\bin
set ROCM_BIN=%HIP_PATH%\bin
set LLAMA_DIR=%CD%\llama.cpp
set LLAMA_BIN_OUT=%CD%\llama.cpp.bin
:: By default the bin directory of the rocm windows sdk does not seem to be in path so we add it
@LeagueRaINi
LeagueRaINi / upscalee.rs
Last active September 12, 2023 16:27
Video upscaling using ffmpeg and realesrgan poc
#![feature(path_file_prefix)]
use std::io::{BufRead, BufReader, ErrorKind};
use std::path::PathBuf;
use std::process::{Command, Stdio};
use anyhow::{bail, Context, Result};
use clap::Parser;
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use serde::Deserialize;
@LeagueRaINi
LeagueRaINi / ssd1305.rs
Last active April 23, 2023 20:11
Basic ssd1305 display driver written and tested with the waveshare 2.33 pico oled using using spi and embedded-graphics
//! Basic display driver for the waveshare oled 2.23 (128x32)
//!
//! # Example for a raspberry pi pico
//!
//! ```rust
//! #![no_std]
//! #![no_main]
//! #![feature(type_alias_impl_trait)]
//!
//! use embassy_rp::spi::Spi;
@LeagueRaINi
LeagueRaINi / auto-accept.ps1
Created February 5, 2023 13:11
league of legends auto accept written for powershell 7.x
function log {
param(
[parameter(mandatory)]
[string]$msg
)
write-host "$("[{0:HH:mm:ss}]" -f (get-date)) $msg"
}
function request-endpoint {
@LeagueRaINi
LeagueRaINi / clone.rs
Last active November 22, 2022 23:47
Code for cloning tags onto chinese mifare classic 1k cards that have sector 0 backdoors using the mfrc552 on the raspberry pi
//! # Connections
//!
//! IMPORTANT: Do *not* use PIN24 / BCM8 / CE0 as the NSS pin
//!
//! - PIN1 = 3V3 = VCC
//! - PIN19 = BCM10 = MOSI
//! - PIN21 = BCM9 = MISO (SCL)
//! - PIN23 = BCM11 = SCLK
//! - PIN22 = BCM25 = NSS (SDA)
//! - PIN6 = GND = GND
@LeagueRaINi
LeagueRaINi / bios_splitter.rs
Created April 30, 2022 20:27
Splits am4 dual bios roms
use std::fs;
use std::path::{Path, PathBuf};
use anyhow::{Context, Result};
use clap::Parser;
#[derive(Parser, Debug)]
#[clap(about, author, version)]
struct Opt {
/// Path to the bios rom
@LeagueRaINi
LeagueRaINi / ForzaHide.cs
Last active November 21, 2021 18:20
Ghetto fix to hide the cursor in forza horizon 5 when the mice is inactive
using System.Runtime.InteropServices;
using System.Diagnostics;
[DllImport("user32.dll")]
static extern nint GetForegroundWindow();
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetCursorPos(
out Point lpPoint