Skip to content

Instantly share code, notes, and snippets.

View corneil's full-sized avatar

Corneil du Plessis corneil

View GitHub Profile
#!/bin/bash
set +e
brew doctor
RC=$?
if ((RC>0); then
echo "Installing: Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc
alias mcist="./mvnw clean install -DskipTests -T 1C"
alias mt="./mvnw test"
alias md="./mvnw dependency:tree"
alias gc="./gradlew clean"
alias gb="./gradlew build"
alias gcb="./gradlew clean build"
alias gch="./gradlew check"
@corneil
corneil / AssertionUtils.java
Created September 3, 2025 11:38
Utility for determining if JVM is running assertions enabled.
public class AssertionUtils {
public static boolean assertionsEnabled = false;
static {
// When this class is loaded the static block will execute and it the application is running with -ea the value of assertionsEnabled will be set to true.
//noinspection AssertWithSideEffects
assert (assertionsEnabled = true);
}
}