Skip to content

Instantly share code, notes, and snippets.

View MartyMacGyver's full-sized avatar

Martin Falatic MartyMacGyver

View GitHub Profile
#!/usr/bin/env python3
"""
Python 3 code that can decompress (to a .gvas file), or recompress (to a .savegame file)
the UE4 savegame file that Astroneer uses.
Though I wrote this for tinkering with Astroneer games saves, it's probably
generic to the Unreal Engine 4 compressed saved game format.
Examples:
@MartyMacGyver
MartyMacGyver / latin1_in_utf8_fixer.py
Last active December 6, 2021 03:01
Latin1 -> UTF-8 and double-encoded UTF-8 fixer I wrote to process a few munged Wordpress databases
# Fixes double-encoded UTF-8
# By Martin Falatic, www.Falatic.com 2021-12-03
# Mappings based on https://www.i18nqa.com/debug/utf8-debug.html
"""
Unmapped:
0x81
0x8D
0x8F
@MartyMacGyver
MartyMacGyver / ESP-IDF-install-and-run-from-master-on-windows.txt
Last active December 1, 2021 11:47
Installing and running the Espressif ESP-IDF on Windows from master (e.g. to run with the ESP32-S3)
More documentation can be found at:
https://www.falatic.com/index.php/255/on-the-cutting-edge-with-the-esp32-s3
If you haven't done so already, install the following:
- Git for Windows (https://gitforwindows.org/)
- Python (https://www.python.org/) version 3.6 or later (3.10 is the latest that I've tested)
Open a normal command line window (cmd.exe or Windows Terminal) and follow along:
;: ########################################################################
@MartyMacGyver
MartyMacGyver / RPi_Kernel_building_cross_compiled.sh
Last active May 12, 2021 06:45
Building the kernel for the Raspberry Pi/Pi2/Pi3 using a cross-compiler
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
@MartyMacGyver
MartyMacGyver / Cylon-mod.ino
Created May 24, 2020 08:53
FastLED 3.3.3 and Teensy 4.0/4.1 (with Teensyduino 1.5.2) troubleshooting.
#include <FastLED.h>
// How many leds in your strip?
#define NUM_LEDS 8
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 7 // 7 on Teensy 4.0/4.1, 25 on ESP32
#define CLOCK_PIN 13
@MartyMacGyver
MartyMacGyver / RPi_Kernel_building_with_optional_kmemleak_etc.sh
Last active June 28, 2018 13:57
Building the kernel for the Raspberry Pi/Pi2/Pi3 (with headers and optional memory leak debugging steps)
###############################################################################
# Compiling the RPi kernel in situ, with optional memory leak debugging
#
# Extends https://www.raspberrypi.org/documentation/linux/kernel/building.md
###############################################################################
# On the Raspberry Pi
cd ~/Projects
# Install rerequisites
@MartyMacGyver
MartyMacGyver / Building-Installing_Go_on_the_RPi_or_Ubuntu.bash
Last active April 2, 2018 03:54
Building / Installing Go on the Raspberry Pi or Ubuntu
###############################################################################
# Building Go on the Raspberry Pi
###############################################################################
# Based on the work of Dave Cheney
# http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi
# Also info in the docs:
# https://github.com/golang/go/blob/master/src/make.bash
###############################################################################
### Set project area
@MartyMacGyver
MartyMacGyver / Installing_Arduino_on_Ubuntu_16.04.bash
Last active May 21, 2017 21:37
Installing Arduino on Ubuntu 16.04+ (also Star OTTO info!)
###############################################################################
# Installing Arduino on Ubuntu 16.04+
###############################################################################
### Set project area
export MYPROJROOT=~/Projects
export MYPKGNAME=arduino
export MYPKGVER=1.8.2
export MYPKGOS=linux
export MYPKGARCH=amd64 # Intel architectures
@MartyMacGyver
MartyMacGyver / Building_Python_on_the_RPi2.bash
Last active May 21, 2017 19:53
Building Python on the Raspberry Pi2
# Condensed and revised from Blake's site (unreachable currently):
# http://sowingseasons.com/blog/building-python-3-4-on-raspberry-pi-2.html
# Install prerequisites
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y \
build-essential libncursesw5-dev libgdbm-dev libc6-dev \
zlib1g-dev libsqlite3-dev tk-dev libssl-dev openssl \
libreadline6-dev liblzma-dev libbz2-dev libdb-dev
### Keybase proof
I hereby claim:
* I am martymacgyver on github.
* I am martymacgyver (https://keybase.io/martymacgyver) on keybase.
* I have a public key whose fingerprint is DA1D FD8F 990E 6C91 9711 4128 859F 5DF6 F4A9 8D01
To claim this, I am signing this object: