Newton, science as religion
Science is the only good thing that humanity has done for itself, being the only one responsible for the best inventions and advancements in history: medicine, agriculture, education and commerce. And it has created growth, which for almost all of humanity had not existed: in 2000 years…
Book summary 2/3
We feel compelled to “reciprocate” emotions: if one hurts you, and you want to hurt them too.
if you step foot on the table, you scream at the table.
If we fail to “reciprocate”, we conclude that we deserved it. and vice versa
and therefore it seems that…
Pilecki was an heroic person who voluntarily entered Auschwitz and tried to evade people, a complete suicide mission. It was the one who told the outside world the nazis were actually killing jews. Within the prisoners he organized a network of messages in the laundry basket.
Then he was captured, he…
If you need a maven plugin that creates a properties file with the information taken from the .git directory, then use the git-commit-id maven plugin available from maven central.
Here is how I configured. At the initialise phase it reads the .git from the parent directory (we use a monorepo)…
If you need to insert a record, and in case of conflict (e.g. UNIQUE key) you can solve it by updating a value, you can use the `ON CONSTRAINT constraint_name DO UPDATE SET column=<expression>`, see the documentation.
Note that this syntax
The Postgres function gen_random_uuid() to create random UUID was added on Postgres 13
If you need it for older versions, you can use instead this:
uuid_in(overlay(overlay(md5(random()::text || ':' || clock_timestamp()::text)…
To access a resource file from Spring, you can’t just refer to it to its path(“src/main/resources/words.txt”) as when packaged into the JAR, the path will likely change (depending on your config).
The simplest thing to do is placing the file inside the resource directory, and refer to it as “classpath:words.txt”