This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Type-preserving runtime wrapper over {@link Object#entries()}. */ | |
| export function objectEntries<T extends Record<PropertyKey, unknown>>( | |
| o: T, | |
| ): T extends unknown ? { [K in keyof T]-?: K extends string ? [K, T[K]] : never }[keyof T][] : never { | |
| // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion | |
| return Object.entries(o) as ReturnType<typeof objectEntries<T>>; | |
| } | |
| /** Type-preserving runtime wrapper over {@link Object#fromEntries()}. */ | |
| export function objectFromEntries<T extends readonly (readonly [PropertyKey, unknown])[]>( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| git push -u || exit 1 | |
| gh pr create --assignee @me "$@" || exit 2 | |
| gh pr merge --auto --squash || gh pr merge --auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| # There is no button in the interface of GitHub (and as it seems also no API) with which workflows can be deleted. | |
| # They are eventually removed automatically, but in case you want to clean up your Actions UI it is sometimes nice | |
| # to have the possibility to get rid of workflows that are not required anymore. This interactive script allows you | |
| # to achieve exactly that by deleting each individual run of a workflow, after which GitHub deletes the workflow. | |
| declare -ir CONCURRENCY=${CONCURRENCY:-8} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gradle.projectsLoaded { | |
| @Suppress("UNCHECKED_CAST") | |
| val versions = java.util.Properties().apply { | |
| load(rootProject.file("version.properties").inputStream()) | |
| } as Map<String, String> | |
| allprojects { | |
| // We export the versions so that our tasks can access them | |
| // programmatically as well if required. | |
| extra["versions"] = versions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { it.group != "org.junit.vintage" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ECHO OFF | |
| :: https://pureinfotech.com/delete-large-folder-fast-windows-10/ | |
| ECHO Delete Folder: %CD%? | |
| PAUSE | |
| SET FOLDER=%CD% | |
| CD / | |
| DEL /F/Q/S "%FOLDER%" > NUL | |
| RMDIR /Q/S "%FOLDER%" | |
| EXIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 | |
| fi | |
| readonly JENV_HOME=${JENV_HOME:-"$HOME/.jenv"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 | |
| fi | |
| apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 | |
| apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| brew install gradle jenv mvn | |
| mkdir -p ~/bin | |
| curl -Lo ~/bin/gradle 'https://gist.githubusercontent.com/Fleshgrinder/b4411e49fb97f000d57b65755d49740c/raw/gradle' | |
| chmod +x ~/bin/gradle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| JAVA_HOME=$(jenv javahome) | |
| export JAVA_HOME | |
| if [[ -f mvnw ]]; then | |
| exec ./mvnw "$@" | |
| else | |
| readonly project_dir=$PWD |
NewerOlder