This file contains 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
# Requires GitHub CLI installed and authenticated. | |
export USER="" | |
export REPO="" | |
export BRANCH="master" | |
gh api repos/$USER/$REPO/actions/runs | jq -r '.workflow_runs[] | select(.head_branch == "master") | "\(.id)"' | xargs -n1 -I % gh api repos/$USER/$REPO/actions/runs/% -X DELETE > out.log 2> /dev/null |
This file contains 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
<plugin> | |
<groupId>com.diffplug.spotless</groupId> | |
<artifactId>spotless-maven-plugin</artifactId> | |
<version>${spotless.version}</version> | |
<configuration> | |
<java> | |
<googleJavaFormat> | |
<version>1.3</version> | |
<style>AOSP</style> | |
</googleJavaFormat> |
This file contains 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
<plugin> | |
<groupId>com.rudikershaw.gitbuildhook</groupId> | |
<artifactId>git-build-hook-maven-plugin</artifactId> | |
<version>${gitbuildhook.version}</version> | |
<configuration> | |
<installHooks> | |
<pre-commit>hooks/pre-commit.sh</pre-commit> | |
</installHooks> | |
</configuration> | |
<executions> |
This file contains 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
// After Spotless | |
public boolean eventEvicted(final SlingshotMessage message) { | |
return alreadyReceivedEviction(message) | |
|| unsubscribedEviction(message) | |
|| ignoreBeforeEviction(message) | |
|| noUndoSupportEviction(message); | |
} |
This file contains 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
#!/bin/sh | |
echo '[Git Hook] Executing Spotless check before commit' | |
# Only compare files that have changed compared to master | |
mvn spotless:check -DratchetFrom=origin/master | |
exit $? |
This file contains 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
version: "3" | |
services: | |
# https://hub.docker.com/_/traefik | |
traefik: | |
container_name: traefik | |
image: traefik:v2.2 | |
restart: unless-stopped | |
command: | |
- --api |
This file contains 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
#!/bin/bash | |
# Delete all S3 buckets matching matching the custom pattern | |
for bucket in $(aws s3 ls | awk '{print $3}' | grep "my-custom-pattern"); do aws s3 rb "s3://${bucket}" --force ; done | |
# Delete all Cloudformation stacks matching the custom pattern | |
for stackId in $(aws cloudformation describe-stacks --query "Stacks[?contains(StackName,'my-custom-pattern')].[StackName]" --output text); do aws cloudformation delete-stack --stack-name $stackId ; done | |
This file contains 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
# Base domain name: example.com | |
DOMAIN= | |
# Email to register certificates for: hello@example.com | |
DOMAIN_EMAIL= | |
# GitHub username to give admin rights: peavers | |
GITHUB_USERNAME= | |
DRONE_GITHUB_CLIENT_ID= |
This file contains 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
find . -iname '*.r[a0-9][r0-9]' | xargs rm -f |
This file contains 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
find . -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 <= 400000' | cut -f 2- | xargs -d \\n rm -rf |