Skip to content

Instantly share code, notes, and snippets.

View GiovanH's full-sized avatar

GiovanH GiovanH

View GitHub Profile
@GiovanH
GiovanH / steam_deck_controller_merge.py
Created March 24, 2024 22:10
Merges all controller mappings for the non-steam game into a combined config using layers
#!/home/deck/python-vdf/bin/python
import srctools.keyvalues
import glob
import os
import datetime
# This script merges all controller mappings for the non-steam game named SHORTCUT_NAME into a combined config using layers.
# It overwrites the bottom two grip buttons to use for paging forward and backward.
# Requires a python venv with srctools installed at ~/python-vdf:
module.exports = {
title: "Godot Pogo Ride w/ Leaderboard",
description: "Use <a href='https://sharkalien.itch.io/imp-pogo-ride'>sharkalien's godot pogo ride remake</a>",
author: "GiovanH",
modVersion: 0.1,
edit(archive) {
archive.mspa.story['002376'].media = ["https://v6p9d9t4.ssl.hwcdn.net/html/7332348/index.html"]
archive.mspa.story['002376'].content += "<br />(<a href='https://sharkalien.github.io/Godot-Imp-Pogo-Ride-Minigame'/>Leaderboard</a>)"
}
@GiovanH
GiovanH / notebook.ipynb
Last active April 8, 2023 02:21
not-minnower-0.2.alpha.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GiovanH
GiovanH / not_for_broadcast_build.py
Created January 4, 2023 23:35
Converts extracted audio and video assets from the game Not For Broadcast into usable MKV files
import glob
import os
import subprocess
import parallel_threads
import itertools
import pprint
def getVideoChapter(mp4):
path, filename = os.path.split(mp4)
filep, ext = os.path.splitext(filename)
// ==UserScript==
// @name CYOA helper
// @match https://*.*/*.png
// @grant none
// @version 1.0
// @author -
// @description Shift+Click to add checkboxes over images
// ==/UserScript==
function inject(){
- author: Rachel
body: '<div class="media-body">
<p>
</p><p>It''s not March, but you know, it seemed like a good time to hang out with
some leprechauns. </p>
function completeImage(img) {
if ((!img.file_url || img.file_url.length < 5) && img.preview_url) {
img.file_url = img.preview_url
.replace("/thumbnails/", "/images/")
.replace("/thumbnail_", "/");
}
return img;
}
var fake_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.112 Safari/537.36)"
@GiovanH
GiovanH / UnityBehaviorExplorer.py
Last active December 2, 2020 03:54
Flask app for browsing through monobehaviors that reference each other. Use with something that exports monobehaviors as json with per-file directories, like https://github.com/GiovanH/AssetStudio/tree/UniqueID
from flask import Flask
import glob
import os
import json
from collections import namedtuple
import re
FileID = namedtuple("FileID", ["fileName", "pathId"])
def safe(x):