I've needed to debug some projects from the CLI, so I created a handy little script to let me do just that. Here it is!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the example program's IR as of October 9, 2024! | |
// Normal version: https://github.com/RedstoneWizard08/DPScript/blob/main/example/src/example.dps | |
// From looking at it right now, it looks correct :D | |
// Yes, this does include the standard library (which is still very incomplete) | |
define variable_alias __RETURN_VAL__: "dpscript:core/funcs" @ "return_value"; | |
func "example:__dpscript_gen/example/funcs/say_hi": { | |
define variable_alias __tmp_var_75e2946a_6731_4d3b_b8f4_e0ec57a803f4: "dpscript:core/vars" @ "__tmp_var_75e2946a_6731_4d3b_b8f4_e0ec57a803f4"; | |
define variable_alias __var_text: "dpscript:core/vars" @ "__var_text"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Automated WASM build tool for Skia (which works better than the one in CanvasKit). | |
Built with love and Python by RedstoneWizard08. (MIT licensed) | |
Use with: https://github.com/google/skia | |
Tools required: | |
- Python 3 (3.11 was used when making this) | |
- Ninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/data/data/com.termux/files/usr/bin/bash | |
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then | |
echo "Usage: $0 [username] [db] [dir]" | |
exit 1 | |
fi | |
dir="$3" | |
pkg i -y postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A fixer for the VisualOres mod (https://www.curseforge.com/minecraft/mc-mods/visualores). | |
# This merges players' data when adding the mod to the server for the first time. | |
import os | |
import nbtlib | |
CLIENT_DIR = "changeme!" | |
SERVER_DIR = "world_changeme!" | |
paths = list(os.listdir("visualores")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
#################################################################### | |
py2modman-cli.py v0.1.0 | |
A simple program to download & install a profile from Thunderstore. | |
Designed for Lethal Company (and my modpack) by @RedstoneWizard08 | |
Licensed under the MIT license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Needs: | |
// - PerlinNoise (https://github.com/Reputeless/PerlinNoise) | |
// - GLM | |
// - >= C++ 11 (I used C++ 20) | |
#include <algorithm> | |
#include <cmath> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! | |
//! An export macro for Rust. | |
//! This is my first procedural macro! | |
//! Feel free to use this however you like. | |
//! I am developing a better version on the side. | |
//! | |
// Macro usages | |
#[macro_use] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==================== RPi.GPIO Development Polyfill ==================== | |
# A handy little polyfill to aid in development with RPi.GPIO in Python. | |
from typing import Callable, TypeAlias | |
HIGH = 1 | |
LOW = 0 | |
IN = 1 | |
OUT = 0 | |
HARD_PWM = 43 |