Skip to content

Instantly share code, notes, and snippets.


Richard Fussenegger Fleshgrinder

View GitHub Profile
Fleshgrinder / settings.gradle.kts
Created Apr 2, 2021
Simple Version Management for Gradle
View settings.gradle.kts
gradle.projectsLoaded {
val versions = java.util.Properties().apply {
} as Map<String, String>
allprojects {
// We export the versions so that our tasks can access them
// programmatically as well if required.
extra["versions"] = versions
Fleshgrinder / build.gradle.kts
Last active Mar 29, 2021
Disallow transitive JUnit 4 and JUnit 5 Vintage dependencies in all Gradle configurations.
View build.gradle.kts
configurations.all {
// If this configuration supports transitive dependencies then we
// exclude any transitive JUnit 4 dependencies from all dependencies
// that are declared in this configuration. This means that users have
// to define an explicit dependency on JUnit 4 if they want to use it.
if (isTransitive) {
withDependencies {
forEach {
(it as? ExternalModuleDependency)
?.takeIf { != "org.junit.vintage" }
Fleshgrinder / rmfr.bat
Created Dec 6, 2020
Fast recursive directory deletion in Windows
View rmfr.bat
ECHO Delete Folder: %CD%?
CD /
Fleshgrinder /
Created Aug 28, 2020
Load Zulu JDKs into jEnv
#!/usr/bin/env bash
set -Eeuo pipefail
if ! command -v jenv &>/dev/null; then
echo 'Could not find jenv in your PATH, make sure it is installed correctly and in your PATH.' >&2
exit 1
readonly JENV_HOME=${JENV_HOME:-"$HOME/.jenv"}
Fleshgrinder /
Created Aug 28, 2020
Install Azul Zulu JDKs on Ubuntu
#!/usr/bin/env bash
set -Eeuo pipefail
if ((EUID != 0)); then
echo 'You need superuser privileges (e.g. sudo) to run this script' >&2
exit 1
apt-key adv --keyserver hkp:// --recv-keys 0xB1998361219BD9C9
apt-add-repository 'deb stable main'
Fleshgrinder / jenv
Last active Jun 19, 2019
How to install jEnv on a Mac with Maven and Gradle wrapper support.
View jenv
#!/usr/bin/env bash
set -Eeuo pipefail
brew install gradle jenv mvn
mkdir -p ~/bin
curl -Lo ~/bin/gradle ''
chmod +x ~/bin/gradle
Fleshgrinder / mvn
Last active Mar 18, 2020
Script to execute Maven wrapper with jEnv and fallback to global Maven installation.
View mvn
#!/usr/bin/env bash
set -Eeuo pipefail
JAVA_HOME=$(jenv javahome)
export JAVA_HOME
if [[ -f mvnw ]]; then
exec ./mvnw "$@"
readonly project_dir=$PWD

Keybase proof

I hereby claim:

  • I am Fleshgrinder on github.
  • I am fleshgrinder ( on keybase.
  • I have a public key whose fingerprint is 07DC 4CF5 EF0B 27D9 A311 9EA5 A5A2 6F7B 85A4 A347

To claim this, I am signing this object:

View git-clean-branches
#!/usr/bin/env bash
set -eu
usage() {
cat << EOT
Clean local branches except for master.
Usage: git-clean-branches [options...]
Fleshgrinder / windows-setup.ps1
Last active Aug 23, 2020
A few commands I routinely execute after setting up a new Windows machine to speed thing up a little and disable annoying stuff.
View windows-setup.ps1
function dword {
Param([string] $path, [string] $name, [string] $value)
if (!(Test-Path $path)) {
New-Item -Path (Split-Path $path) -Name (Split-Path $path -leaf) | Out-Null
New-ItemProperty -Path $path -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
# disables the creation of so called 8dot3names
fsutil 8dot3name set 1 | Out-Null