Skip to content

Instantly share code, notes, and snippets.

@othmane-kinane-nw
othmane-kinane-nw / LiquibaseMigrationIntegrationTests.java
Last active March 27, 2025 10:59
JUnit tests to ensure there's no missing Liquibase migration and that hibernate successfully valide the final schema
import liquibase.CatalogAndSchema;
import liquibase.Contexts;
import liquibase.Liquibase;
import liquibase.database.Database;
import liquibase.database.DatabaseFactory;
import liquibase.database.jvm.JdbcConnection;
import liquibase.diff.output.DiffOutputControl;
import liquibase.exception.DatabaseException;
import liquibase.exception.LiquibaseException;
import liquibase.integration.commandline.CommandLineUtils;
@othmane-kinane-nw
othmane-kinane-nw / application.yml
Created January 4, 2025 23:44
Disable Actuator endpoints by default
management:
endpoints:
enabled-by-default: false
web:
exposure:
include: "*"
endpoint:
info:
enabled: true
info:
@othmane-kinane-nw
othmane-kinane-nw / detect-case-sensitivity-issues-in-paths.sh
Last active August 29, 2024 19:51
Detect file and directory paths in a git repo that differ only by case
#!/bin/bash
set -e
shopt -s expand_aliases
XARGS_MAX_CMD_LENGTH=`echo | xargs --show-limits 2>&1 | awk '/POSIX upper limit on argument length/ {print $NF}'`
echo "Checking paths under '$PWD' for case related problems..."
alias sort_case_insensitive='sort -f'
alias uniq_show_grouped_duplicates='uniq -i --all-repeated=separate'