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
| publish := Def.taskDyn { | |
| def isLocalResolver(r: Resolver) = r match { | |
| case _: MavenCache => true | |
| case _: FileRepository => true | |
| case _ => false | |
| } | |
| val publishOrig = publish.taskValue | |
| val logger = streams.value.log | |
| val moduleID = projectID.value | |
| val scalaModule = scalaModuleInfo.value |
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 fastparse.protobuf | |
| import java.nio.file.{Files, Paths} | |
| import scala.reflect.macros.whitebox | |
| import scala.jdk.CollectionConverters._ | |
| object Resources { | |
| def readResource(path: String): String = macro Resources.readResourceImpl |
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 sangria.marshalling.circe._ | |
| import sangria.schema._ | |
| import sangria.macros._ | |
| import io.circe.Json | |
| import io.circe.syntax._ | |
| object FederationSchema { | |
| val federation = | |
| gql""" |
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 com.disneystreaming.cxeng.utils | |
| import cats.effect._ | |
| /** | |
| * Allow resources to be safely acquired and released in utest test suites. | |
| * {{{ | |
| * import utest._ | |
| * | |
| * object FooTests extends TestSuite with UtestResourceHelper[FileResource] { |
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 amm | |
| import $ivy.{ | |
| `com.github.alexarchambault::case-app:2.0.0-M9`, | |
| `com.gubbns::uritemplate4s:0.3.0`, | |
| `io.circe::circe-core:0.12.0-RC2`, | |
| `io.circe::circe-generic-extras:0.12.0-RC2`, | |
| `org.http4s::http4s-circe:0.20.9`, | |
| `org.http4s::http4s-dsl:0.20.9`, | |
| `org.http4s::http4s-blaze-client:0.20.9`, | |
| `org.slf4j:slf4j-nop:1.7.26` |
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
| #!/bin/bash | |
| set -euo pipefail | |
| # determine version from git tag | |
| # x.y.z when commit is tagged | |
| # includes git hash when untagged | |
| exec git describe --tags --abbrev=8 --match v[0-9]* --always --dirty | sed 's/^v//' |
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 $ivy.`software.amazon.awssdk:kinesis:2.5.31` | |
| import $ivy.`software.amazon.awssdk:netty-nio-client:2.5.31` | |
| def localAwsClient[Builder <: AwsClientBuilder[Builder, _]](builder: Builder, endpoint: String): Builder = { | |
| val creds = AwsBasicCredentials.create("dummy", "dummy") | |
| builder | |
| .endpointOverride(URI.create(endpoint)) | |
| .region(Region.US_EAST_1) | |
| .credentialsProvider(StaticCredentialsProvider.create(creds)) | |
| } |
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
| #!/bin/bash | |
| set -euo pipefail | |
| # requires moreutils for vipe `brew install moreutils`. | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: $0 tag" | |
| exit 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
| import $ivy.{ | |
| `io.circe::circe-core:0.10.0`, | |
| `io.circe::circe-generic:0.10.0`, | |
| `io.circe::circe-parser:0.10.0` | |
| } | |
| import io.circe._, io.circe.parser._ | |
| def walk(js: Json, f: Json => Json): Json = | |
| js.arrayOrObject( | |
| f(js), |
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
| #!/bin/bash | |
| set -euo pipefail | |
| # stream gzip data from S3 | |
| if [[ $# -ne 3 ]]; then | |
| echo "Usage: $0 bucket path parallel" | |
| exit 1 | |
| fi |