function sdk-switch-java() {
if [[ -z ${SDKMAN_DIR} ]]; then
echo >&2 "Error: $SDKMAN_DIR not set"
return 1
fi
if [[ $# -le 0 ]]; then
echo >&2 "Error: missing version argument"
return 1
fi
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 | |
| IFS=$'\n' read -rd '' -a services <<<"$(find "/opt/services" -mindepth 1 -maxdepth 1 -type d -printf '%f\n')" | |
| for service in "${services[@]}"; do | |
| echo "rendering ${service}" | |
| sudo docker run --rm -it \ | |
| -v "/opt/services/${service}:/input:ro" \ | |
| -v "${PWD}:/output" \ | |
| pmsipilot/docker-compose-viz render -f -m image -o "/output/${service}.png" -- "docker-compose.yaml" | |
| done |
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 sh | |
| set -ex | |
| cat > Dockerfile << "EOF" | |
| FROM scratch | |
| COPY deathstar.com /deathstar | |
| CMD ["/deathstar"] | |
| EOF |
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 -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| log() { | |
| echo >&2 "$*" | |
| } |
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 -euo pipefail | |
| output=${1:-"config/server-banlist.json"} | |
| dl() { | |
| local arr | |
| arr=("$(curl --silent --show-error --fail --location "${1}" | jq "${2}")") | |
| echo "${arr[@]}" |
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
| [Unit] | |
| # curl -L -O https://github.com/tracer4b/nomi-ceu/releases/download/1.3.5/nomi-ceu-server-1.3.5.zip \ | |
| # && mkdir -p /opt/server \ | |
| # && unzip nomi-ceu-server-1.3.5.zip -d /opt/server \ | |
| # && rm -f nomi-ceu-server-1.3.5.zip \ | |
| # && echo "eula=true" > /opt/server/eula.txt \ | |
| # && chown -R mc:mc /opt/server \ | |
| # && systemctl daemon-reload \ | |
| # && systemctl start nomi.service \ |
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
| help: | |
| @grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
| # test build requirements | |
| REQUIRED_BINS := podman | |
| $(foreach bin,$(REQUIRED_BINS),\ | |
| $(if $(shell command -v $(bin) 2> /dev/null),$(),$(error please install missing build requirement: `$(bin)`))) | |
| .ONESHELL: | |
| # this will be evaluated to set the shell, even when not called explicitly |
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 -o errexit | |
| set -o pipefail | |
| log() ( | |
| echo >&2 "$*" | |
| ) | |
| panic() ( |
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 -exuo pipefail | |
| latest_issue="70" | |
| curl \ | |
| --location \ | |
| --remote-name \ | |
| --progress-bar \ |
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
| { | |
| "createdBy": "Redirector v3.5.3", | |
| "createdAt": "2023-08-02T15:27:37.166Z", | |
| "redirects": [ | |
| { | |
| "description": "twitter.com -> nitter.net", | |
| "exampleUrl": "https://twitter.com/foo", | |
| "exampleResult": "https://nitter.net/foo", | |
| "error": null, | |
| "includePattern": "https://twitter.com/*", |