GitHub Actions for Python projects using poetry
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
--- | |
apiVersion: argoproj.io/v1alpha1 | |
kind: AnalysisTemplate | |
metadata: | |
name: integrationtests | |
spec: | |
metrics: | |
- name: integrationtests | |
failureLimit: 0 | |
provider: |
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.14-alpine as backend | |
# Precompile standard library | |
RUN CGO_ENABLED=0 GOOS=linux go install -v -a std | |
# Install dependencies | |
WORKDIR /go/src/cache-failure | |
COPY ./go.mod ./go.sum ./ | |
SHELL ["/bin/ash", "-o", "pipefail", "-c"] | |
RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get -v |
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
readinessProbe: | |
exec: | |
command: ["/root/grpc_health_probe", "-addr=:6666"] | |
initialDelaySeconds: 1 | |
livenessProbe: | |
exec: | |
command: ["/root/grpc_health_probe", "-addr=:6666"] | |
initialDelaySeconds: 2 | |
imagePullPolicy: IfNotPresent |
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
resource "aws_vpc_endpoint" "s3" { | |
vpc_id = "${aws_vpc.main.id}" | |
service_name = "com.amazonaws.us-west-2.s3" | |
tags = { | |
Environment = "test" | |
} | |
} |
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 random | |
from datetime import datetime, timezone | |
BASE62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def encode(num, alphabet=BASE62): | |
"""Encode a positive number in Base X | |
Arguments: | |
- `num`: The number to encode | |
- `alphabet`: The alphabet to use for encoding |
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 asyncio | |
from aiohttp import ClientSession | |
async def fetch(url, session): | |
async with session.get(url) as response: | |
return await response.json() | |
async def main(): | |
url = 'http://localhost:8000' |
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 | |
date -u +"%a, %Y-%m-%d" | xclip -sel clip | |
echo "Evernote header date has been copied to your clipboard" |
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 | |
date -u +"%Y-%m-%d" | xclip -sel clip | |
echo "Short ISO 8601 date has been copied to your clipboard." |
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 | |
date -u +"%Y-%m-%dT%H:%M:%SZ" | xclip -sel clip | |
echo "ISO 8601 compliant timestamp has been copied to your clipboard." |