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
// You can import the Bittrex v3 API collection into Postman: https://github.com/Bittrex/bittrex.github.io/tree/master/src/_data | |
// To use this script ensure the following is available in Postman: | |
// A Collection Variable `baseUrl` | |
// An Environment Variable BITTREX_API_KEY | |
// An Environment Variable BITTREX_API_SECRET | |
// set up vars | |
let timestamp = new Date().getTime() | |
let url = pm.request['url'] |
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
/* | |
* This file was generated by the Gradle 'init' task. | |
* | |
* This generated file contains a sample Kotlin application project to get you started. | |
*/ | |
plugins { | |
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM. | |
id 'org.jetbrains.kotlin.jvm' version '1.3.21' |
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 kotlinx.coroutines.* | |
import kotlin.random.Random | |
fun main() = runBlocking { | |
val start = System.nanoTime() | |
val result = observeRateLimitAsync(1000) { | |
someExpensiveOperationWithRateLimit() | |
}.await() | |
println("Result [$result] retrieved in ${(System.nanoTime() - start) / 1_000_000} ms") | |
} |
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
# Stage 1, build container | |
ARG VERSION=8u181 | |
FROM openjdk:${VERSION}-jdk-slim as BUILD | |
# Get gradle distribution | |
COPY *.gradle gradle.* gradlew /src/ | |
COPY gradle /src/gradle | |
WORKDIR /src | |
RUN ./gradlew --version |
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 io.mockk.every | |
import io.mockk.mockkStatic | |
import org.junit.jupiter.api.Assertions.assertEquals | |
import org.junit.jupiter.api.BeforeEach | |
import org.junit.jupiter.api.Test | |
import java.time.Clock | |
import java.time.Instant | |
import java.time.ZoneId | |
internal class ClockFixingTest { |
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 | |
PROJECT_ID=$(gcloud config get-value core/project --quiet) | |
TRIGGER_ID=$1 | |
curl -s -XDELETE -H"Authorization: Bearer $(gcloud config config-helper --format='value(credential.access_token)')" https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/triggers/${TRIGGER_ID} | jq '.' |
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 | |
PROJECT_ID=$(gcloud config get-value core/project --quiet) | |
JSON=$1 | |
TRIGGER_ID=$(jq -r '.id' ${JSON}) | |
curl -s -XPATCH -T ${JSON} -H"Authorization: Bearer $(gcloud config config-helper --format='value(credential.access_token)')" https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/triggers/${TRIGGER_ID} | jq '.' |
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 | |
PROJECT_ID=$(gcloud config get-value core/project --quiet) | |
TRIGGER_ID=$1 | |
curl -s -XGET -H"Authorization: Bearer $(gcloud config config-helper --format='value(credential.access_token)')" https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/triggers/${TRIGGER_ID} | jq '.' | |
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 | |
PROJECT_ID=$(gcloud config get-value core/project --quiet) | |
JSON=$1 | |
curl -s -XPOST -T ${JSON} -H"Authorization: Bearer $(gcloud config config-helper --format='value(credential.access_token)')" https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/triggers | jq '.' |
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 | |
PROJECT_ID=$(gcloud config get-value core/project --quiet) | |
curl -s -XGET -H"Authorization: Bearer $(gcloud config config-helper --format='value(credential.access_token)')" https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/triggers | jq '.' |
NewerOlder