Skip to content

Instantly share code, notes, and snippets.

View OndraZizka's full-sized avatar
⛴️
Shippin'

Ondrej Zizka OndraZizka

⛴️
Shippin'
View GitHub Profile
@OndraZizka
OndraZizka / fix_ghost_luks.sh
Created May 19, 2026 16:32
Fix LUKS mounting after HDD power loss - "file already exists"
#!/bin/bash
## Cleans up stale LUKS device mappings.
## Usage: sudo ./fix_ghost_luks.sh
set -e
# Color output
RED='\033[0;31m'
GREEN='\033[0;32m'
@OndraZizka
OndraZizka / README.md
Created May 19, 2026 15:49
Tuning HDD performance options in Linux

For long batches of unattended work performed by a single process, HDD access scheduling can be optimized to let the Linux kernel and the disk's driver save some HDD head movements when not necessary.

The script takes a number, where 0 are the system defaults, 1 is UI-oriented, and then 2 to 5 give gradually larger buffers and longer IO deadlines (to utilize caching to the max).

@OndraZizka
OndraZizka / Ollama.sh
Last active April 24, 2026 02:01
AI CLI stuff
## Edit the config
sudo systemctl edit ollama.service
## Notify systemd about changes
sudo systemctl daemon-reload
## Apply the config to Ollama
sudo systemctl restart ollama
@OndraZizka
OndraZizka / regenerate-snap-profiles.sh
Created September 30, 2025 13:15
Regenerate Snap profiles (Ubuntu)
#!/bin/bash
## Get a list of all installed snaps, filtering out the system core components.
## The 'snap list' command outputs a table; awk is used to extract the snap name (first column)
## and 'tail -n +2' skips the header line.
## 'grep -v' filters out the core system snaps like core, core18, snapd, etc.
SNAP_LIST=$(snap list | tail -n +2 | awk '{print $1}' | grep -v 'core\|snapd\|gtk-common-themes\|gnome-3-38-2004\|kde-frameworks-5-99-qt-5-15-8-core20\|content')
echo "Starting AppArmor profile regeneration for all user-installed snaps..."
@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%