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
| from aws_cdk import ( | |
| aws_apprunner as apprunner, | |
| aws_cloudfront as cloudfront, | |
| aws_cloudfront_origins as origins, | |
| aws_ecr as ecr, | |
| aws_iam as iam, | |
| aws_route53 as route53, | |
| aws_route53_targets as targets, | |
| aws_certificatemanager as acm, | |
| core, |
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
| - name: Check all app builds | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const apps = ['app1', 'app2', 'app3']; | |
| const pr = context.payload.workflow_run.pull_requests[0]; | |
| // Get all check runs for this PR | |
| const checks = await github.rest.checks.listForRef({ | |
| owner: context.repo.owner, |
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
| tasks.register<Copy>("downloadDependencies") { | |
| from(configurations.runtimeClasspath) | |
| into("local-repo/jars") | |
| } | |
| tasks.register("downloadDependenciesWithMetadata") { | |
| doLast { | |
| configurations.runtimeClasspath.get().resolvedConfiguration.resolvedArtifacts.forEach { artifact -> | |
| val moduleVersion = artifact.moduleVersion.id | |
| val group = moduleVersion.group.replace(".", "/") |
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
| rbenv is a Ruby version manager that allows you to install multiple versions of Ruby and switch between them. Follow the steps below to install Ruby using rbenv. | |
| Install all required dependencies for the ruby-build plugin to download and compile Ruby. | |
| console | |
| Copy | |
| $ sudo apt install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev libtool uuid-dev | |
| Install the latest rbenv installation script. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // This is our map type | |
| typealias FunctionalMap<K, V> = (K) -> V? | |
| // An empty map never has the value | |
| fun <K, V> emptyMap(): FunctionalMap<K, V> = { _ -> null } | |
| // Match the key to the value or fallback | |
| fun <K, V> FunctionalMap<K, V>.put(key: K, value: V): FunctionalMap<K, V> = { k -> | |
| if (k == key) value else this(k) | |
| } |
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
| class AdjustableTickingClock( | |
| private val startTime: Instant = EPOCH, | |
| private val tick: Duration = Duration.ofSeconds(5) | |
| ) : Clock() { | |
| private var currentTime = startTime | |
| override fun getZone() = ZoneId.of("UTC") | |
| override fun withZone(zone: ZoneId?) = this | |
| override fun instant() = currentTime.also { currentTime += tick } |
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
| package org.http4k.example | |
| import com.amazonaws.services.lambda.runtime.Context | |
| import com.amazonaws.services.lambda.runtime.events.SQSEvent | |
| import org.http4k.aws.AwsSdkClient | |
| import org.http4k.client.JavaHttpClient | |
| import org.http4k.core.HttpHandler | |
| import org.http4k.core.Uri | |
| import software.amazon.awssdk.auth.credentials.AwsBasicCredentials | |
| import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider.create |
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
| import com.azure.core.http.HttpClient | |
| import com.azure.core.http.HttpHeader | |
| import com.azure.core.http.HttpHeaders | |
| import com.azure.core.http.HttpRequest | |
| import com.azure.core.http.HttpResponse | |
| import org.http4k.core.Body | |
| import org.http4k.core.Body.Companion.EMPTY | |
| import org.http4k.core.HttpHandler | |
| import org.http4k.core.Method | |
| import org.http4k.core.Request |
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
| import org.http4k.contract.PreFlightExtraction | |
| import org.http4k.contract.contract | |
| import org.http4k.contract.meta | |
| import org.http4k.core.Body | |
| import org.http4k.core.Filter | |
| import org.http4k.core.Method.POST | |
| import org.http4k.core.Request | |
| import org.http4k.core.Response | |
| import org.http4k.core.Status.Companion.BAD_REQUEST | |
| import org.http4k.core.Status.Companion.OK |
NewerOlder