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 | |
set -e | |
store=$1 | |
if [ -z "$store" ]; then | |
echo "Usage: $0 [store-name]" | |
exit 1 | |
fi | |
export TPM2_PKCS11_STORE=$HOME/.local/share/tpm2-pkcs11/${store} |
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
PROJECT_ID=myproject | |
gcloud scheduler jobs create http ${PROJECT_ID}-run-build \ | |
--schedule='1 12 * * *' \ | |
--uri=https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/builds?alt=json \ | |
--message-body-from-file=- \ | |
--oauth-service-account-email=${PROJECT_ID}@appspot.gserviceaccount.com \ | |
--oauth-token-scope=https://www.googleapis.com/auth/cloud-platform \ | |
<<EOF | |
{ "steps": [ | |
{ |
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 | |
set -eo pipefail | |
function _ensure_var() { | |
if [ -z "${!1}" ]; then | |
echo "$1 must be set" | |
exit 1 | |
fi | |
} |
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 golang:1.16-buster AS builder | |
WORKDIR /src | |
RUN apt-get update && apt-get install -qy --no-install-recommends npm | |
COPY Makefile ./ | |
RUN make deps | |
FROM builder AS build | |
WORKDIR /src | |
ENV GOPROXY="https://proxy.golang.org" | |
COPY go.mod go.sum ./ |
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
SHELL := /usr/bin/env bash -o pipefail | |
PROJECT := myproject | |
HTTPS_PROTOS := https://github.com/shelmangroup/myproject.git | |
SSH_PROTOS := ssh://git@github.com/shelmangroup/myproject.git | |
BUF_VERSION := 0.43.2 | |
PROTOC_GEN_GO_VERSION := v1.26.0 | |
PROTOC_GEN_GO_GRPC_VERSION := v1.1.0 |
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/sh | |
exec echo -en "\x1b]52;c;$(base64 -w0)\x07" |
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
static_resources: | |
listeners: | |
- name: http | |
address: | |
socket_address: { address: 0.0.0.0, port_value: 8080 } | |
filter_chains: | |
- filters: | |
- name: envoy.filters.network.http_connection_manager | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager |
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 | |
set -e | |
datadir=$1 | |
app_port=$2 | |
metrics_path=${3:-/metrics} | |
if [[ -z "$datadir" || -z "$app_port" ]]; then | |
echo "Usage: $0 DATADIR APPLICATION_PORT [METRICS_PATH]" | |
exit 1 |
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 | |
set -eo pipefail | |
blocklists=( | |
# Team Cymru bogons lists | |
https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt | |
# SpamHaus DROP (Don't Route or Peer) | |
https://www.spamhaus.org/drop/drop.txt | |
# SpamHaus Extended DROP (Extended Don't Route or Peer) | |
https://www.spamhaus.org/drop/edrop.txt |
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 golang:1.16-buster AS builder | |
WORKDIR /src | |
COPY go.mod go.sum ./ | |
RUN go mod download | |
COPY . . | |
RUN go build ./cmd/director && \ | |
go build ./cmd/frontend && \ | |
go build ./cmd/matchfunction | |
FROM gcr.io/distroless/base-debian10 AS director |