Tuesday, June 21, 2022

Quickly run log4j2 without properties files

Sometimes I just want to use log4j without a properties file and log everything to console. It seems that especially for this reason there exists the DefaultConfiguration class. This applies to log4j2.


import org.apache.logging.log4j.Level;

import org.apache.logging.log4j.LogManager;

import org.apache.logging.log4j.Logger;

import org.apache.logging.log4j.core.config.Configurator;

import org.apache.logging.log4j.core.config.DefaultConfiguration;

public static void main(String... aArgs)  {
Configurator.initialize(new DefaultConfiguration());
Configurator.setRootLevel(Level.DEBUG);
 

 

Friday, June 17, 2022

Online format convertors

Sometimes I have to convert a file from one type to another.

Today I had to convert a WMV file to an MP4 file. As I Googled for a tool to do just this, I discovered there are sites offering free online conversion services. 

I ended up using this one: https://www.freeconvert.com/wmv-to-mp4/

I just uploaded the file, waiting about a minute and then downloaded the converted file. It worked flawlessly.

Monday, June 13, 2022

Jenna's Virtual Life launched on Patreon

Jenna's Virtual Life is an adult sim game, played from a woman's perspective, that I started to work on a while ago. I've decided to create a Patreon account to help with the development effort and to gather people impressions about the game. 

The Patreon page is here: https://www.patreon.com/FairyHataka 

For continued development, please consider becoming a Patron. 

There is also a dedicated page for the game on this blog.

Docker stuff I use

 In this post I will describe a few of the Docker stuff I currently use. May not work for everyone but it may help you get started.

First, if you have a dockerfile you need to build it. I often use intermediate images during the build process (for installing compiling tools). I also call these images stage=intermediate. A simple build script looks like this:

docker build --tag IMAGENAME .

docker rmi -f $(docker images -q --filter label=stage=intermediate)

After successfully building the image, you need to start it. Depending on the image you may need to map ports or data volumes. However, one thing I find useful is to also run docker ps after starting the Docker image. This helps me to check if it really started and didn't exit immediately for some reason. I also start the image with a -RUNNING added to the name. This helps me to better identify the existing images. A simple startup script looks like this:

docker run --name "IMAGENAME-running" -d -p 80:80 IMAGENAME

docker ps

Finally, at some point you may wish to stop the running image. When I stop it, I also remove the -RUNNING image, like this:

docker stop IMAGENAME-running

docker rm IMAGENAME-running

In the unfortunate case of an unscheduled system reboot, you should first run the stop script. This will take care of removing the -RUNNING image and will enable you to start it again using the start script above.


Saturday, June 11, 2022

First post

 Hi! This is my personal blog. I will post here thoughts and ideas.


But first, a few words about myself: I'm a developer and recently started to take an interest into 3D modeling. Actually, I always had an interest into 3D modeling, but never got enough time to do it properly. However recently I found the time to follow this passion. Also recently I was in the mood to open up and create some online content. I do hope that anyone following my blog will find the posts interesting. Still not sure what to write about...maybe just random thoughts ? maybe some programming tips and tricks that I found useful ? maybe some 3D stuff that I am learning ? maybe something else ? Ideas are welcome :)



A game jam

I recently (the last weekend) developed a game for a "game jam" hosted on ItchIO. For those new to this term, the "game jam...