Skip to content

Instantly share code, notes, and snippets.

@srkiNZ84
srkiNZ84 / update_elb_certificate_letsencrypt_route53.sh
Last active August 17, 2021 15:21
Bash script to automate the renewal of LetsEncrypt certificates using DNS authentication with Route53 and then updating the load balancers
#!/usr/bin/bash
# pre-requisites:
# apt install python3-pip awscli
# pip3 install certbot certbot-dns-route53 awscli
# mkdir .certbot/{config,work,logs}
# IAM policy attached to EC2 instance with:
# - route53:ListHostedZones
# - route53:GetChange
# - route53:ChangeResourceRecordSets
@ajkerrigan
ajkerrigan / start_mosh.sh
Created July 9, 2020 03:28
Start Mosh with AWS SSM Session Manager
#!/bin/bash
#
# Mush mosh and SSM sessions together.
#
# Run mosh-server on an EC2 instance as part of an AWS Session Manager SSH
# session, and feed the output into mosh-client locally. This is helpful
# if you have an EC2 instance which:
#
# * Is publicly addressable
# * Has a predictable Name tag but a shifting IP
@adhorn
adhorn / Postmortem
Last active December 18, 2024 16:51
Title:
Incident date:
Owner:
Peer-review committee:
Tags:
Summary:
Supporting data:
Customer Impact:
Incident Response Analysis:
Post-Incident Analysis:
@ishad0w
ishad0w / sources.list
Last active October 16, 2025 08:52
Debian 10 (Buster) -- Full sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ buster/updates main contrib non-free
@dchakro
dchakro / pi.status.sh
Last active December 5, 2021 11:03
Bash shell script to print stats about a Raspberry Pi running pihole
#!/usr/bin/env bash
# Define colors
RED='\033[91m'
RED_solid='\033[101m'
GREEN='\033[92m'
GREEN_solid='\033[42m'
CYAN='\033[96m'
NC='\033[0m'
BLUE_solid='\e[44m'
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active September 27, 2025 23:41
Docker Container Logging using Promtail
@smijar
smijar / k3d-install-dashboard.md
Created April 22, 2020 00:50
k3d-install-dashboard

ref

https://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/

install

Deploying the Kubernetes Dashboard

GITHUB_URL=https://github.com/kubernetes/dashboard/releases
VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
@colorwebdesigner
colorwebdesigner / slackIPChangeInfo.rsc
Last active May 23, 2020 10:36
Mikrotik script for send message to Slack on IP change
:global ipCurrent "$ipCurrent";
{
# Change to your settings
# -----------------------
:local wanInterface "eth1";
:local slackHookUrl "https://hooks.slack.com/services/YOUR/APP/SECRET";
# -----------------------
:local ipNew [/ip address get [find interface=$wanInterface] address];
@mark05e
mark05e / getInstalledAppsFromRegistry-notes.md
Created February 29, 2020 12:09
Get list of all installed applications from registry in 32- or 64-bit Powershell

getInstalledAppsFromRegistry.ps1

Source: Technet Script Center

Example:

.\getInstalledAppsFromRegistry.ps1
$apps = Get-InstalledAppsFromRegistry
$apps | where {$_.DisplayName -like "*Firefox*"}
@mexisme
mexisme / get-image.sh
Created February 27, 2020 22:23
Download an AWS ECR image using Skopeo instead of Docker (e.g. running within a container)
#!/usr/bin/env bash
set -eu
# set -o pipefile
docker_version=${REPO_TAG}
docker_image=${REPO_IMAGE}
# docker_creds=$(aws ecr get-authorization-token --output json |jq -r '.authorizationData[].authorizationToken' |base64 -d)
docker_creds="AWS:$(aws ecr get-login-password)"