Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / recdesk-x11.sh
Last active March 1, 2019 22:53
Shell script for recording my desktop with FFmpeg (X11).
#!/bin/bash
# This script is specific to my local machine. Many of the options may need
# to be changed to work on different systems.
#
# Licensing: CC0
# check if necessary executables are available
FFMPEG=$(which ffmpeg)
XWIN=$(which xwininfo)
@AntumDeluge
AntumDeluge / stendhal.sh
Last active February 18, 2019 23:05
A script for installing/updating Stendhal on a Linux/Unix system.
#!/bin/bash
# A script for installing/updating Stendhal on a Linux/Unix system.
#
# LICENSE: CC0
# script to run/update Stendhal
JAVA=$(which java)
@AntumDeluge
AntumDeluge / irc.md
Created April 5, 2018 00:28 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@AntumDeluge
AntumDeluge / stendhal_hair_outfit_error.md
Created October 5, 2017 08:25
Error occurring with new outfit system in Stendhal.

The following error output occurs when attempting to change hair in client OutfitDialog:

WARN  [AWT-EventQueue-0] Player2DView.java             ( 162) - Cannot build outfit. Setting failsafe outfit.
java.lang.IllegalArgumentException: No body image found for outfit: 12
	at games.stendhal.client.OutfitStore.buildOutfit(OutfitStore.java:129)
	at games.stendhal.client.OutfitStore.getOutfit(OutfitStore.java:412)
	at games.stendhal.client.OutfitStore.getOutfit(OutfitStore.java:395)
	at games.stendhal.client.OutfitStore.getAdjustedOutfit(OutfitStore.java:431)
	at games.stendhal.client.gui.j2d.entity.Player2DView.getAnimationSprite(Player2DView.java:153)
	at games.stendhal.client.gui.j2d.entity.RPEntity2DView.buildSprites(RPEntity2DView.java:669)
@AntumDeluge
AntumDeluge / glass_node_color.lua
Last active August 15, 2017 23:42
Using hardware node coloring with Minetest.
local function dig_glass(pos, node, digger)
local inv = digger:get_inventory()
local can_dig = not core.is_protected(pos, digger:get_player_name())
local drops = {}
if digger:is_player() then
local meta = core.get_meta(pos)
if can_dig then
if not inv:room_for_item('main', node.name) then