Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Refactored by: Patrick Huber (22phuber@gmail.com)
# Description: Digs the current external Ipv4 and compares it to a Ipv4 locally stored in a file.
# If the ips differ, aws cli is used to update a route 53 dns record with the new Ipv4.
# This script only supports Ipv4.
# Original script source:
# - https://willwarren.com/2014/07/03/roll-dynamic-dns-service-using-amazon-route53/
# Dependencies:
# - awscli # install AWS cli: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
@beatsandpics
beatsandpics / kubectl-run-with-pvc.sh
Last active September 13, 2021 06:48 — forked from yuanying/kubectl-run-with-pvc.sh
kubectl run with PVCs
#!/bin/bash
IMAGE="registry.begasoft.ch/base_images_public/bgstoolbox:0"
COMMAND="/bin/sh"
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]')
AWSKEY="none"
AWSSEC="none"
usage_exit() {
echo "Usage: $0 [-c command] [-i image] [-a <AWSKEY>:<AWSSEC>]PVC ..." 1>&2