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 | |
#==================================================================================================# | |
#refresh_vagrant.sh | |
#----------------------- | |
#by: ilobmirt 2023 MAR 05 | |
# | |
#Brings down and up the target vagrant environment, then re-establishes the ssh connection host_ids | |
#==================================================================================================# |
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
ARG IMAGE_TAG="3.8.12-alpine3.15@sha256:ae21a996ebe902ddc73cff020202d94cb539c8c4426f67636374b32a6f9c3d22" | |
FROM python:${IMAGE_TAG} AS builder | |
ARG POETRY_VERSION=1.1.12 | |
# hadolint ignore=DL3013,DL3018 | |
RUN apk add --no-cache \ | |
gcc \ | |
libffi-dev \ | |
musl-dev && \ |
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
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
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 bash | |
# Convert a bash script into an asciinema recording | |
set -o errexit -o nounset -o pipefail | |
INPUT_FILE=${1:-} | |
if [[ -z "${INPUT_FILE}" ]]; then | |
echo "Syntax: $0 <path/to/bash-scipt.sh> <path/to/out.cast>" | |
exit 1 |
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 bash | |
# Convert a bash script into an asciicast recording | |
set -o errexit -o nounset -o pipefail | |
USER=karl | |
WORKDIR="~/workspace" | |
PROMPT="\u001b]0;Cloud Shell\u0007${USER}@cloudshell:\u001b[1;34m${WORKDIR}\u001b[00m$ \u001bkcloudshell\u001b\\\\" |
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
apiVersion: kind.x-k8s.io/v1alpha4 | |
kind: Cluster | |
nodes: | |
- role: control-plane | |
- role: worker | |
containerdConfigPatches: | |
- |- | |
[plugins."io.containerd.grpc.v1.cri".registry] |
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
# https://misc.flogisoft.com/bash/tip_colors_and_formatting | |
RED="\\e[91m" | |
GREEN="\\e[32m" | |
BLUE="\\e[94m" | |
YELLOW="\\e[33m" | |
REGULAR="\\e[39m" | |
REPORTS=".coverage-reports" | |
SRC="app" | |
VERSION=$(shell cat ${SRC}/__init__.py | head -n 1 | cut -d" " -f 3 | tr -d "'") |
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 | |
# Create the cluster | |
kind create cluster --name lb | |
# Get the configuration | |
kind get kubeconfig --name lb > /tmp/lb-kubeconfig | |
# Deploy metallb | |
KUBECONFIG=/tmp/lb-kubeconfig kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/namespace.yaml | |
KUBECONFIG=/tmp/lb-kubeconfig kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/metallb.yaml | |
KUBECONFIG=/tmp/lb-kubeconfig kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)" |
NewerOlder