Skip to content

Instantly share code, notes, and snippets.

View Sanne's full-sized avatar
🌓
Researching Things

Sanne Grinovero Sanne

🌓
Researching Things
View GitHub Profile
@Sanne
Sanne / SKILL.md
Created March 27, 2026 11:08
Main Java dev skill
name java-dev
description Use this skill to develop or debug Java applications

Safety

Our code is often deployed in mission critical scenarios. Make sure to take this in consideration. We need to be very careful to not cause resource leaks (FDs, memory), deadlocks, classloader leaks, or silent data corruption. When the AI detects a violation of these safety rules in existing code, it should output a 'CRITICAL SAFETY WARNING' block in the chat with actionable suggestions and the technical context of the risk (e.g., potential for a Deadlock or memory leak). Our code should also emit appropriate warnings when it's possible to detect violation of assumptions, and such messages should include actionable suggestions.

@Sanne
Sanne / IncusSandbox.md
Last active March 24, 2026 18:04
Incus based secure sandbox isolation

Secure Identity Isolation on Fedora using Incus

This guide explains how to set up a secure, hardware-isolated workspace on Fedora using Incus (System Containers). Unlike standard Docker or Podman, this setup provides a strict security boundary for a secondary "Work" identity while still allowing graphical applications (like a web browser) to run smoothly at native speeds.

Prerequisites

  • A host machine running Fedora.
  • You must be the primary user on the machine (which uses the standard User ID 1000).

@Sanne
Sanne / gist:b9af6f3adb1254028b6a325f541047a7
Last active May 27, 2024 14:23
Quarkus basic quickstart - dependencies
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-maven-plugin/3.10.2/quarkus-maven-plugin-3.10.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-maven-plugin/3.10.2/quarkus-maven-plugin-3.10.2.pom (10 kB at 970 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-bom/3.10.2/quarkus-bom-3.10.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-bom/3.10.2/quarkus-bom-3.10.2.pom (449 kB at 1.3 MB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/3.10.2/quarkus-bootstrap-core-3.10.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/3.10.2/quarkus-bootstrap-core-3.10.2.pom (4.0 kB at 55 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-parent/3.10.2/quarkus-bootstrap
@Sanne
Sanne / 10-script.sh
Created October 3, 2023 11:48
Networkmanager listeners to reconfigure my local Maven proxies
#!/bin/sh
# Store as /etc/NetworkManager/dispatcher.d/10-script.sh
# make the script executable & owned by root. (protect it too!)
# Will trigger on up/down events of the selected network
HOME_CONNECTION_ID="TanaUB6"
LOG=/home/sanne/.m2/track-wifi-status-change
# echo "################" >> $LOG
# env >> $LOG
# echo "env HOME_CONNECTION_ID:" >> $LOG
public void compareAndSerialize(Object o) {
if (o instanceof Comparable) {
useComparable((Comparable) o);
}
if (o instanceof Serializable) {
useSerializable((Serializable) o);
}
}
@Sanne
Sanne / custom.cnf
Created September 12, 2022 15:48
MySQL configuration for testing
#
# MariaDB tuning meant for fast integration test execution:
# data is meant to be lost. Never use for actual database needs!
#
[mysqld]
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links = 0
@Sanne
Sanne / Maven mirror settings
Last active September 8, 2022 10:26
Optimised Maven settings.xml for within my home
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
</proxies>
<mirrors>
<mirror>
@Sanne
Sanne / OtherApp.java
Created May 12, 2022 13:13
Exploring scheduling strategy of async CompletableFuture(s)
import java.util.concurrent.CompletableFuture;
public class OtherApp {
private static final boolean wait = false;
public static void main(String[] args) {
VeryParallelExecutor executor = new VeryParallelExecutor( 4 );
OneOffDelegatingExecutor taskControl = new OneOffDelegatingExecutor( executor );
@Sanne
Sanne / git-update.sh
Last active January 16, 2017 18:17
git-update
#!/bin/bash
# Temporarily checks out the "master" branch, fetches updates from upstream,
# pushes a copy to "origin" to keep it in synch, and then returns to the original
# branch.
#
# Released under the WTFPL license version 2 http://sam.zoy.org/wtfpl/
#
# Copyright (c) 2014 Sanne Grinovero
requireBranchName() {
#!/bin/sh
# version 20170828
# Backup script using rsync to create multiple snapshots of the source.
# A little known trick of rsync is to be able to run a three-way comparison,
# so to only transfer the diffs but store a full copy in a new directory,
# while comparing and hard linking to the previous snapshot.
# This allows to make many frequent snapshots at minimal network and storage
# impact.
#
# This version doesn't do any form of rotation: you'll eventually run out of space.