Skip to content

Instantly share code, notes, and snippets.

@minwoox
minwoox / git-trigger-build.sh
Created May 11, 2021 09:11 — forked from trustin/git-trigger-build.sh
git-trigger-build: Triggers a CI build by pushing an empty commit
#!/bin/bash -e
# Stash the staged files if any.
NEEDS_UNSTASH=0
if ! git diff --staged --exit-code >/dev/null; then
echo -ne '\033[1;32m'
echo -n 'Stashing the staged files'
echo -e '\033[0m'
git stash
NEEDS_UNSTASH=1
package example.armeria.server.annotated;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
import com.fasterxml.jackson.annotation.JsonProperty;
package armeria.lecture.week3;
import java.util.Scanner;
import java.util.concurrent.ConcurrentLinkedQueue;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import com.linecorp.armeria.client.WebClient;
import com.linecorp.armeria.common.HttpData;
/*
* Copyright 2020 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
function try_wrapper() {
WRAPPER_NAME="$1"
FALLBACK="$2"
shift 2
WRAPPER="$WRAPPER_NAME"
for ((I=0; I<32; I++)); do
if [[ -x "$WRAPPER" ]]; then
WRAPPER="$(readlink -e "$WRAPPER")"
break
diff --git a/dependencies.yml b/dependencies.yml
index 5cdc38a5..1f90bb61 100644
--- a/dependencies.yml
+++ b/dependencies.yml
@@ -6,11 +6,11 @@ boms:
- com.fasterxml.jackson:jackson-bom:2.10.1
- io.dropwizard.metrics:metrics-bom:4.1.1
- io.grpc:grpc-bom:1.25.0
- - io.micrometer:micrometer-bom:1.3.1
+ - io.micrometer:micrometer-bom:1.3.2
import java.util.concurrent.CompletableFuture;
import com.linecorp.armeria.client.HttpClient;
import com.linecorp.armeria.client.HttpClientBuilder;
import com.linecorp.armeria.common.AggregatedHttpResponse;
import com.linecorp.armeria.common.HttpRequest;
import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.server.HttpService;
import com.linecorp.armeria.server.Server;
import com.linecorp.armeria.server.ServiceRequestContext;
import java.util.concurrent.CompletableFuture;
import org.junit.jupiter.api.Test;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import com.linecorp.armeria.common.HttpData;
import com.linecorp.armeria.common.HttpObject;
import com.linecorp.armeria.common.HttpRequest;
import com.linecorp.armeria.common.HttpResponse;
$ \cat ~/.local/bin/git-checkout-pr
#!/bin/bash -e
if [[ $# -ne 1 ]] || [[ ! "$1" =~ (^[1-9][0-9]*$) ]]; then
echo "Usage: $0 <pull request ID>" 1>&2
exit 1
fi
ORIGIN='origin'
if git remote | grep -qE '^upstream$'; then
ORIGIN='upstream'