Skip to content

Instantly share code, notes, and snippets.

View OndraZizka's full-sized avatar
🫖

Ondrej Zizka OndraZizka

🫖
View GitHub Profile
@OndraZizka
OndraZizka / Vibe-coding-prediction.md
Last active May 9, 2025 00:39
I don't trust the vibe coding hype much for a very simple reason...

I don't trust the vibe coding hype much for a very simple reason...

What is it? You describe an application you want. With natural language. The bigger the app, the longer description. (Throwing away iterative steps is nonsense, for the same reason why "the code documents itself" is nonsense: It represents what is, not what is supposed to be. Therefore, the complete description is needed to reproduce the app reliably.)

A description of an enterprise project like ours will be quite long - with all the requirements, legal quirks, legacy data, error handling, security...

So such description will need:

@OndraZizka
OndraZizka / custom-favicon-page.html
Created May 6, 2025 10:42
A page with a custom dynamic favicon and title. Can be used for Firefox Tree Style Tab as a group designator.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading...</title>
<link id="favicon" rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="> <style>
body {
font-family: sans-serif;
padding: 20px;
@OndraZizka
OndraZizka / maven-latest-plugins.pom.xml
Last active April 24, 2025 15:25
Maven latest plugins - basic set for pluginManagement
<pluginManagement>
<plugins>
<!-- Last updated 2025-04-24 from https://gist.github.com/OndraZizka/ff189184597770444db4ee27f144c01f.
To get new: mvn versions:display-plugin-updates -Dmaven.version.ignore='(?i).*(beta|alpha|RC|CR).*' -->
<plugin><groupId>org.jetbrains.kotlin</groupId><artifactId>kotlin-maven-plugin</artifactId><version>${kotlin.version}</version></plugin>
<plugin><groupId>org.jetbrains.dokka</groupId><artifactId>dokka-maven-plugin</artifactId><version>2.0.0</version></plugin>
<plugin><groupId>io.fabric8</groupId><artifactId>docker-maven-plugin</artifactId><version>0.46.0</version></plugin>
<plugin><groupId>io.quarkus.platform</groupId><artifactId>quarkus-maven-plugin</artifactId><version>${quarkus.platform.version}</version><extensions>true</extensions></plugin>
<plugin><artifactId>maven-enforcer-plugin</artifactId><version>3.5.0</version></plugin>
@OndraZizka
OndraZizka / Maven-super-short-intro.md
Last active April 16, 2025 09:16
Maven super-short intro.

Maven super-short intro.

Note

Maven is declarative, not procedural. By default it is in XML, but you can write it in other languages.* We will use YAML.

 

Tip

Maven works on a principle of a “tree of trees” of build configuration overlaid over each other, which then create an effective tree - so called POM (project object model).

@OndraZizka
OndraZizka / Flyway-docker-image-usage.txt
Created April 10, 2025 00:51
Flyway Docker image usage
[flyway/flyway:latest] "flyway": Start container 980e2f7f4081
: Usage
: flyway [options] [command]
: flyway help [command]
:
: By default, the configuration will be read from conf/flyway.conf.
: Options passed from the command-line override the configuration.
:
: Commands
: help Print this usage info and exit
@OndraZizka
OndraZizka / Steam-proton-setting.md
Created April 9, 2025 18:20
Steam - custom setting for games to work on Linux
PROTON_USE_WINED3D=1 %command%
@OndraZizka
OndraZizka / StackBasedContext.kt
Created October 10, 2023 21:44
A Stack-based Processing Context for Kotlin
class StackBasedContext(
val nestingStack: Deque<NestingLevel> = ArrayDeque(),
val problems: MutableList<Pair<String, List<NestingLevel>>> = mutableListOf(),
) {
override fun toString() = nestingStack.ifEmpty { listOf("(root)") }.joinToString("/")
fun addProblem(msg: String) { problems.add(msg to nestingStack.descendingIterator().asSequence().toList()) }
fun pushLevel(dataParam: KParameter): PopOnClose { nestingStack.push(NestingLevel(dataParam)); return PopOnClose() }
fun pushLevel(collectionIndex: Int): PopOnClose { nestingStack.push(NestingLevel(collectionIndex = collectionIndex)); return PopOnClose() }
@OndraZizka
OndraZizka / ResourceUtils.kt
Created September 1, 2023 21:45
Kotlin - utilities for loading resources from the classpath.
import java.io.FileNotFoundException
import java.io.InputStream
import java.nio.file.Path
object ResourceUtils {
fun getCallingClassName(): String? {
var testUtilsSpotted = false;
for (stackItem in Thread.currentThread().stackTrace) {
if (stackItem.className == ResourceUtils::class.java.name) {
@OndraZizka
OndraZizka / startup.md
Created April 15, 2023 21:54 — forked from dsyer/startup.md
Notes on Spring Boot startup performance

Anatomy of Spring Boot Start Up Timing

When a Spring Boot app starts up with default (INFO) logging, there are some noticeable gaps (pauses). It's worth focusing on the gaps when looking for efficiency savings because of the amount of time they take, and because no-one bothered to log anything, so the chances are the app is doing something repetitive. We can tweak the logging levels to try and fill in the gaps and find out what is going on in there.

Basic empty web app with actuators has three such gaps:

0                                                                        1410ms
|------|---------------------------|-----|------|---------|--------|--------|
       |           578             |     |144(5)|         | 133(6) |
@OndraZizka
OndraZizka / fetchAllGitRepos.sh
Last active April 18, 2023 19:07
Fetch all Git repos in subdirectories
#!/bin/bash
## Run this in a directory to fetch all Git repos within it.
find -name .git | sed 's#.git##' | sort | xargs -t -n1 -I % git -C % fetch --all
## CRON job: You can also put this into `crontab -e` in order to keep all repos up-to-date automatically:
# # m h DoM mth DoW command
# */5 * * * * find /home/ondra/work -name .git | sed 's#.git##' | sort | xargs -t -n1 -I % git -C % fetch --all --tags --force