Skip to content

Instantly share code, notes, and snippets.

@AntumDeluge
AntumDeluge / stendhal_get_testclient.py
Last active October 29, 2023 01:35
A script for retrieving the current Stendhal test client.
#!/usr/bin/env python
# This file is licensed under CC0.
#
# A script for retrieving the Stendhal Java client.
#
# This script requires Python to be installed on your system.
# Tested with Python versions 2.7, 3.6, & 3.7. If you would like
# download progress displayed, install the "wget" module. The
# "wget" module can be installed via Pypi:
@AntumDeluge
AntumDeluge / cleanwhitespace.py
Created January 10, 2020 05:02
A simple script for cleaning up whitespace in text/source files.
#!/usr/bin/env python
# A simple script for cleaning up whitespace in text/source files.
#
# Licensing: CC0
# The author hereby relinqueshes any copyright claim to this script
# & dedicates it to the public domain.
#
# TODO:
# - add help & usage information
@AntumDeluge
AntumDeluge / stendhalserver.sh
Last active April 23, 2020 06:01
Shell script for launching Stendhal server
#!/usr/bin/env bash
# Public Domain dedication:
#
# The author hereby relinquishes all rights to this work & dedicates
# it to the Public Domain via Creative Commons Zero (CC0). See:
# https://creativecommons.org/licenses/publicdomain/
# change this path to root installation directory of Stendhal server
@AntumDeluge
AntumDeluge / stendhalserver.ps1
Last active April 23, 2020 06:01
PowerShell script for launching Stendhal server
<#
Public Domain dedication:
The author hereby relinquishes all rights to this work & dedicates
it to the Public Domain via Creative Commons Zero (CC0). See:
https://creativecommons.org/licenses/publicdomain/
#>
@AntumDeluge
AntumDeluge / CHANGES.txt
Last active September 30, 2022 16:24
A simple Python script that will convert any 3 column by 4 row N/E/S/W sprite sheet image to S/W/E/N.
1.1
- Fix temp file creation error when not calling script from source file directory.
1.0
- Initial release.
@AntumDeluge
AntumDeluge / semitrans_to_opaque.py
Last active March 11, 2022 03:43
GIMP plugin to convert semitransparent pixels to opaque
#!/usr/bin/env python
'''
Date: 2020-12-23
Description:
A simple GIMP plugin that duplicates & merges down the current
layer multiple times in order convert semitransparent pixels to
opaque without losing/changing color.
@AntumDeluge
AntumDeluge / image_to_video.md
Created February 11, 2021 00:30
FFmpeg Single Image to Video

Convert image to video in FFmpeg

To convert a single image to video, use the -loop option to specify we are looping an image & the -t option to specify the duration of the resulting video:

-loop 1 -i <img_in> -t <duration>

To add empty audio, use the lavfi format with anullsrc input (change channel layout & sample rate as needed):

-f lavfi -i anullsrc=channel_layout=mono:sample_rate=44100
@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)"
@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 / 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