mkdir registry
cd registry/
mkdir auth
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
set_toolchains("mingw") | |
set_plat("mingw") | |
set_arch("x86_64") | |
add_rules("mode.debug", "mode.release") | |
target("test") | |
add_cxflags("-static-libstdc++", "-static-libgcc") | |
add_ldflags("-static-libstdc++", "-static-libgcc") |
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 | |
BASE_IMAGE_NAME="new_lambda" | |
CONTAINER_NAME="${BASE_IMAGE_NAME}_container" | |
IMAGE_WITH_TAG="${BASE_IMAGE_NAME}:test" | |
docker build . -t ${IMAGE_WITH_TAG} | |
docker run -d -p 9000:8080 --name ${CONTAINER_NAME} ${IMAGE_WITH_TAG} | |
result=$(curl "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}') |
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 python3 | |
"""Util to fetch sample files.""" | |
import json | |
import logging | |
from dataclasses import dataclass | |
from urllib.error import HTTPError | |
from urllib.request import Request, urlopen | |
logging.basicConfig(encoding="utf-8", level=logging.INFO, format="%(asctime)-15s %(levelname)-8s | %(message)s") |
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 argparse import ArgumentParser | |
from pathlib import Path | |
from ruamel.yaml import YAML | |
yaml = YAML() | |
yaml.preserve_quotes = True | |
yaml.width = 4096 | |
yaml.boolean_representation = ["false", "true"] |
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 os | |
import platform | |
import sys | |
from rich.console import Console | |
from rich.table import Table | |
FILE_READ_BUFFER_SIZE = 32 * 1024 | |
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 re | |
import click | |
import fileinput | |
# Used to address deprecating set-outputcommand | |
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ | |
# Search project for relevant files | |
# egrep -r --include="*.yml" "set-output" | awk '{print $1}' | awk '!seen[$0]++' | awk -F':' '{print $1}'\ | sort > temp/github_files.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
1 .gitconfig X | |
# This is Git's per-user configuration file. | |
[user] | |
name = <user> | |
email = <email> | |
[alias] | |
# Base | |
co = checkout |
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 | |
# | |
# Usage: | |
# ./make_certs.sh test.example.com | |
# | |
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix | |
# | |
# test.example.com.key | |
# test.example.com.crt (includes ca-certs) |
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
class AnsiColors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
FAIL = '\033[91m' | |
ENDC = '\033[0m' | |
BOLD = '\033[1m' | |
UNDERLINE = '\033[4m' |