Skip to content

Instantly share code, notes, and snippets.

@AntumDeluge
AntumDeluge / luanti-cdb-readme.py
Last active July 2, 2026 19:00
Script to parse & format README text for ContentDB.
#!/usr/bin/env python3
'''
MIT License
Copyright © 2026 Jordan Irwin (AntumDeluge)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
@AntumDeluge
AntumDeluge / git-aliases.gitconfig
Last active June 11, 2026 08:00
Git aliases for managing multipe mirrors.
[alias]
# use custom alias instead of `git remote` to exclude possible third party forks
myremotes = !echo # add remote names here
fetchmaster = "!f() { echo \"Fetching branch master ...\"; for r in `git myremotes`; do git fetch ${r} refs/heads/master; done; }; f"
pushmaster = "!f() { echo \"Pushing branch master ...\"; for r in `git myremotes`; do git push ${r} master:master; done; }; f"
pushbranch = "!f() { b=`git branch --show-current` && echo \"Pushing branch ${b} ...\"; for r in `git myremotes`; do git push ${r} refs/heads/${b}; done; }; f"
pushfbranch = "!f() { b=`git branch --show-current` && echo \"Force pushing branch ${b} ...\"; for r in `git myremotes`; do git push -f ${r} refs/heads/${b}; done; }; f"
pushtags = "!f() { echo \"Pushing tags ...\"; for r in `git myremotes`; do git push --tags ${r}; done; }; f"
@AntumDeluge
AntumDeluge / luanti-mod-set-version.py
Last active June 10, 2026 00:37
Script to set Luanti mod version to current date in format YYYY-MM-DD.
#!/usr/bin/env python3
'''
MIT License
Copyright © 2026 Jordan Irwin (AntumDeluge)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
@AntumDeluge
AntumDeluge / luanti-cdb-release.py
Last active July 2, 2026 18:45
Script for triggering or uploading Luanti ContentDB release.
#!/usr/bin/env python3
'''
MIT License
Copyright © 2026 Jordan Irwin (AntumDeluge)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
@AntumDeluge
AntumDeluge / stendhal_simulate_combat.sh
Created June 22, 2023 05:46
Shell script to run Stendhal combat simulation.
#!/usr/bin/env bash
classpath="./:./libs/*:./build/build_stendhaltools/:./build/build_server/:./build/build_server_script/:./build/build_server_maps/:./build/build_server_xmlconf/"
defines=()
params=()
for arg in "$@"; do
echo "${arg}" | grep -q "^\-D";
ret=$?
@AntumDeluge
AntumDeluge / toidx.sh
Last active February 19, 2023 19:45
Script to Convert PNG Images to Indexed Color
#!/usr/bin/env bash
## Creative Commons Zero (CC0) public domain dedication
#
# To the extent possible under law, the author has
# waived all copyright and related or neighboring
# rights to this work. This work is published from:
# The United States.
#
## For more information see: https://creativecommons.org/publicdomain/zero/1.0/
@AntumDeluge
AntumDeluge / creature_spawn_points.txt
Last active May 28, 2022 20:08
Calculates drop rarity score for items
dark elf knight;9
Dhohr Nuggetcutter;1
babybear;11
assassin;151
dark elf general;8
littlewizard;44
djinn;29
barbarian chaman;4
elf bodyguard;8
bat;89
@AntumDeluge
AntumDeluge / cleanwhitespace.py
Last active March 15, 2022 11:52
Script to clean leading & trailing whitespace in text files.
#!/usr/bin/env python
## The MIT License (MIT)
#
# Copyright © 2022 Jordan Irwin (AntumDeluge)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
@AntumDeluge
AntumDeluge / genpreviews.py
Created August 12, 2021 18:12
Python script for creating Minetest skin preview images
#!/usr/bin/env python
# License header:
#
# The MIT License (MIT)
#
# Copyright (c) 2021 Jordan Irwin (AntumDeluge)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
@AntumDeluge
AntumDeluge / build_versioned_docs.sh
Last active August 16, 2021 08:28
LDoc config template for documenting Minetest mods
#!/usr/bin/env bash
# place this file in mod ".ldoc" directory
d_config="$(dirname $(readlink -f $0))"
cd "${d_config}/.."
d_root="$(pwd)"