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 / 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() {
@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 / 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 / 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
public void compareAndSerialize(Object o) {
if (o instanceof Comparable) {
useComparable((Comparable) o);
}
if (o instanceof Serializable) {
useSerializable((Serializable) o);
}
}
@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
@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