Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / recdesk-win32.sh
Last active May 21, 2021 16:49
Shell script for recording my desktop with FFmpeg (Windows 10 w/ MSYS2/BASH shell).
#!/bin/bash
# This script can be re-distributed under the CC0 license (public domain).
#
# It is created specifically for my system (Windows 10 with MSYS2/BASH shell).
# If you want to use it on you may need to change certain values such as the
# audio device name.
# defines whether or not mouse is drawn
MOUSE=1
@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 / 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 / placeholdimg.py
Last active March 11, 2022 03:43
A Python script for replacing the opaque pixels of an image with an "overlay"
#!/usr/bin/env python
# This script replaces pixel data of a source image with that of another image by
# tiling its data over the source image.
#
# Appreciation goes out to GeeMack & Fred Weinhaus (fmw42) for helping me with
# using the ImageMagick `convert` command:
# https://stackoverflow.com/a/49397413/4677917
# Licensing: Creative Commons Zero (CC0)
@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 / 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 / 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.