Skip to content

Instantly share code, notes, and snippets.

@dkosmari
dkosmari / fetch-wiiu-crash-logs.sh
Last active May 19, 2024 04:57
A shell script to fetch Wii U crash logs through FTPiiU plugin. Requires wget and sed.
#!/bin/sh -e
# This scripts copies crash logs from a Wii U running Aroma with FTPiiU plugin.
WIIU_ADDRESS=${1:-wiiu}
TEMP_PATH=$(mktemp -d)
if [[ -z "$TEMP_PATH" ]]
then
@dkosmari
dkosmari / Dockerfile
Created November 13, 2023 21:45
Dockerfile for cross-compilation of SFML from Fedora, using mingw32.
### Usage (this will create an image named "test"):
### docker build -t test
### docker run -it test
FROM fedora:latest
RUN dnf update -y
RUN dnf install -y cmake
RUN dnf install -y mingw32-gcc-c++ mingw32-libstdc++
#!/bin/env python3
import sys
import struct
# tool to recalculate N64 rom checksums
# reference code:
# https://github.com/queueRAM/sm64tools/blob/master/n64cksum.c
# https://github.com/queueRAM/sm64tools/blob/master/libsm64.c
@dkosmari
dkosmari / ustealth-hide.sh
Created July 21, 2018 23:05
ustealth in python to hide FAT32 partitions from Wii U
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Missing argument: device"
exit 1
fi
printf '\xAB' | dd of=$1 bs=1 seek=511 count=1 conv=notrunc
@dkosmari
dkosmari / downgrade.sh
Created March 4, 2018 19:52
Script to downgrade mga7 from a Mageia 6 install, mostly automated.
#!/bin/bash
for package in $(rpm -qa --queryformat "%{NAME}^%{VERSION}^%{RELEASE}^%{ARCH}\n" | grep "mga7")
do
IFS="^" read -a fields <<< "$package"
name=${fields[0]}
echo "downgrading $name"
urpmi --auto --downgrade "$name" || exit 1
done
@dkosmari
dkosmari / spec.py
Created February 17, 2018 10:12
More pythonic version
#!/bin/env python3
import curses
import curses.ascii
import datetime
import humanize
import psutil
def main(screen):