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
package platform.medium.example.architecture; | |
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; | |
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noMethods; | |
import static com.tngtech.archunit.library.dependencies.SlicesRuleDefinition.slices; | |
import com.tngtech.archunit.core.domain.JavaClasses; | |
import com.tngtech.archunit.core.importer.ImportOption.DoNotIncludeTests; | |
import com.tngtech.archunit.junit.AnalyzeClasses; | |
import com.tngtech.archunit.junit.ArchTest; |
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
package com.suman.demo.listener; | |
import com.suman.demo.Processor; | |
import lombok.RequiredArgsConstructor; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.cloud.aws.messaging.listener.Acknowledgment; | |
import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; | |
import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; | |
import org.springframework.stereotype.Component; | |
import reactor.core.publisher.BaseSubscriber; |
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
import fetch from "node-fetch"; | |
import {logger} from "./logWithMdc.js"; | |
const fetchReceipt = (receiptId, log) => { | |
log.info(`Fetching receipt for ${receiptId}`) | |
// https://jsonplaceholder.typicode.com/todos/{id} can be used for testing | |
return fetch(`https://jsonplaceholder.typicode.com/todos/${receiptId}`) | |
.then(res => { | |
if (res.ok) { | |
log.info(`Successfully fetched receipt for ${receiptId}`) |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
# git version 2.38.1 | |
_get_latest_tag(){ | |
local prefix="${1:-}" | |
git tag -i -l "${prefix}*" --sort -v:refname | head -n1 | |
} |
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
#!/usr/bin/env bash | |
# git version 2.38.1 | |
set -euo pipefail | |
_get_latest_tag() { | |
local prefix="${1:-}" | |
git tag -i -l "${prefix}*" --sort -v:refname | head -n1 | |
} |
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
FROM amazoncorretto:17-alpine as corretto-deps | |
COPY ./greetings/build/libs/greetings.jar /app/ | |
RUN unzip /app/greetings.jar -d temp && \ | |
jdeps \ | |
--print-module-deps \ | |
--ignore-missing-deps \ | |
--recursive \ | |
--multi-release 17 \ |
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
#!/usr/bin/env bash | |
# aws-cli/2.9.1 | |
_generate_random_password(){ | |
local length="${1:-64}" | |
# You can fine tune the excluded characters | |
aws secretsmanager get-random-password --password-length "${length}" --no-include-space --exclude-characters "{#\@\"\`'^&(/)%:;<>,_?}!$" --require-each-included-type --output text | |
} |
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
#!/usr/bin/env bash | |
# aws-cli/2.9.1 | |
_generate_random_password(){ | |
local length="${1}" | |
# You can fine tune the excluded characters | |
aws secretsmanager get-random-password --password-length "${length}" --no-include-space --exclude-characters "{#\@\"\`'^&(/)%:;<>,_?}!$" --require-each-included-type --output text | |
} |
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 | |
# jq-1.6, aws-cli/2.9.19 | |
# shellcheck disable=SC2086 | |
_scan_table() { | |
local total_segments="$1" | |
local segment="$2" | |
shift || true |
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
name: build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-matrix-config: | |
runs-on: ubuntu-22.04 |