-
Divide and Conquer, Medieval II: Total War mod (DaC) experience
Divide and Conquer is a Medieval II: Total War Kingdoms mod in Lord of the Rings setting. Technically a “sub” mod of Third Age: Total War, but at this point it is fair to say it is a mod on it’s own since it greatly imroves and expands almost every aspect of TaTW. I have…
-
Building Qt 5.15 on Windows with OpenSSL
I have written about the many problems of building Qt 5 with OpenSSL in the past. Several years later, it is time to upgrade to latest Qt 5.15 which is presumably the last in the Qt 5 series. This time I decided to drop the Windows XP support since it is just too much work…
-
An OpenSprinkler success story
I wanted to automate the watering system at home preferably using open-source and DIY systems. The initial plan was to go with plain RPi, OpenHAB and some GPIO code driving the sprinkler valves but the problem was creating a useful UI to control the system since OpenHAB is too clunky and generic looking. I was…
-
Debugging Laravel in Eclipse PDT
I don’t use PHP enough to justify buying a PHPStorm license so I am using Eclipse PDT instead. I am a bit rusty with Eclipse and PHP so I couldn’t really find anything on Google about debugging Laravel projects in Eclipse. Finally figured it out, here is how. Examples are done on Eclipse IDE Version:…
-
Apache http to https redirect – use 307
Who knew that a simple thing like HTTP redirects would be so complicated? It turns out clients will just change POST to GET on 301 (Postman, curl, everyone?), same with 302 which really behaves like 303 and that is also an old implementation “bug”. Yeah, seriously. If you have a REST API with POST (or…
-
Setting env variables with hyphen and running a program
Docker compose allows you very unrestrictive naming of your environment variables. It allows you to use hyphen and other “special” characters in variables names. When you need to use these variables in regular shell you are out of luck, bash and many other shells do not allow hyphens in variable names. But this is merely…
-
Obscure IntelliJ IDEA “bug” with maven jdk profile activation “not working”
Since Java 9 it is popular to activate additional dependencies which were removed from the core JDK through maven profile. <profiles> <profile> <id>java9-modules</id> <activation> <jdk>[9,)</jdk> </activation> <dependencies> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> </dependencies> </profile> </profiles> Using Java 11 , jaxb-api would correctly show in maven dependency tree and Docker packaged application would work correctly with…
-
Receive only the data your client needs – full dynamic JSON filtering with Jackson
A lot of times JSON returned by your REST API grows to incredibly big structures and data sizes due to business logic complexity that is added over time. Then there are API methods returning a list of objects which can be huge in size. If you serve multiple clients, each one can have different demands…
-
Updating server from Debian Stretch to Buster
Not the most pleasant experience.. I expected a smoother upgrade from Debian team. Upgrading from 8 to 9 was a walk in the park compared to this. 1. MySQL silently fails to start after upgrade MySQL was left behind at version 5.5 after upgrade and would just not start anymore, probably segfaulting. There is no…
-
HTPP Accept-Language request header to ResourceBundle
HTTP Accept-Language header is specified by the client to inform the backend what the preferred language for the response is. In Java, the go-to utility for handling localization is ResourceBundle. What is missing is a standard way to properly convert the input header to the correct ResourceBundle. Specifically, ResourceBundle i18n = ResourceBundle.getBundle("bundles/translations", request.getLocale()); is insufficient.…