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 main | |
import ( | |
"errors" | |
"os" | |
"golang.org/x/exp/slog" | |
) | |
func main() { |
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 | |
# | |
# Author: Daniel Lundin <[email protected]> | |
# | |
# Convenience script to hide sensitive variables on the command line. | |
# Uses keyctl to store secrets in the keyring. | |
# | |
# Example usage: mycommand --user=foo --password=$(pw mypass) | |
set -eo pipefail |
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 python | |
import duckdb | |
import pyarrow as pa | |
import pyarrow.csv as csv | |
# curl -L https://www.stats.govt.nz/assets/Uploads/Annual-enterprise-survey/Annual-enterprise-survey-2021-financial-year-provisional/Download-data/annual-enterprise-survey-2021-financial-year-provisional-csv.csv | gzip > /tmp/test-header.csv.gz | |
data = csv.read_csv('/tmp/test-header.csv.gz') | |
con = duckdb.connect() |
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 -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 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
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 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 -eo pipefail | |
function _ensure_var() { | |
if [ -z "${!1}" ]; then | |
echo "$1 must be set" | |
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
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 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
SHELL := /usr/bin/env bash -o pipefail | |
PROJECT := myproject | |
HTTPS_PROTOS := https://github.com/shelmangroup/myproject.git | |
SSH_PROTOS := ssh://[email protected]/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 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/sh | |
exec echo -en "\x1b]52;c;$(base64 -w0)\x07" |
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
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 |