Skip to content

Instantly share code, notes, and snippets.

@mkol5222
mkol5222 / README.md
Created November 5, 2024 15:35 — forked from yorickdowne/README.md
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Ubuntu 24.04

From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."

I don't have my dual-disk test system any longer, and so can't adjust these steps myself.

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

resource "azurerm_container_group" "aci_caddy" {
resource_group_name = "aci_caddy"
location = local.location
name = "aci_caddy"
os_type = "Linux"
dns_name_label = "aci-caddy"
ip_address_type = "public"
container {
name = "app"
@mkol5222
mkol5222 / docker-for-mac.md
Created September 2, 2024 16:16 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@mkol5222
mkol5222 / terminal.sh
Created September 2, 2024 06:06 — forked from webarchitect609/terminal.sh
Git: disable GPG signing for current repo only.
# Write local
git config --local commit.gpgsign false
# Read local (if never set, can be an empty value)
git config --local commit.gpgsign
@mkol5222
mkol5222 / azure-update-ddns.dockerfile
Created August 27, 2024 20:34 — forked from ramondeklein/azure-update-ddns.dockerfile
Update Azure DNS based on current external IP (dyndns)
FROM mcr.microsoft.com/azure-cli:latest
COPY azure-update-ddns.sh /usr/local/bin
RUN chmod 755 /usr/local/bin/azure-update-ddns.sh
CMD ["/usr/local/bin/azure-update-ddns.sh"]
@mkol5222
mkol5222 / README.md
Created June 12, 2024 17:25 — forked from killerbees19/README.md
[certbot] Let's Encrypt: Dual RSA/ECDSA certificates without frequent key changes

Tested at

  • Debian Buster [2019-07-18]
  • Debian Bullseye [2022-04-28]

Installation

apt update
apt full-upgrade

apt install certbot nginx-full
@mkol5222
mkol5222 / get-aws-console-url.js
Created March 27, 2024 12:05 — forked from janaz/get-aws-console-url.js
Generate AWS console URL from the credentials stored in environment variables
/**
* This little program prints out the url to the AWS console
* generated from the local AWS credentials stored in environment variables:
* AWS_ACCESS_KEY_ID
* AWS_SECRET_ACCESS_KEY
* AWS_SESSION_TOKEN
*
* Steps:
* 1. Create a JSON object
* session = JSON.stringify({
multipass launch -n testvm -mem --cpu 1 --disk 5G --memory 2G 22.04 --cloud-init ~/.config/cloud-init.yml -v
ip_addr=$(multipass info testvm | awk '/IPv4/ {print $NF}')
ssh "ubuntu@${ip_addr}"
@mkol5222
mkol5222 / child-ingress.yaml
Created March 24, 2024 16:30 — forked from mgudesblatart/child-ingress.yaml
current configurations
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-{{ .Release.Name }}-frontend
namespace: {{ .Release.Name }}
annotations:
kubernetes.io/ingress.class: "nginx-3"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.ingress.kubernetes.io/auth-tls-secret: {{ .Release.Name }}/tls-secret
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1"
@mkol5222
mkol5222 / kind-with-ingress.md
Created March 24, 2024 16:29 — forked from AndersBennedsgaard/kind-with-ingress.md
Set up a Kind cluster with working ingress

To get a Kind cluster to work with an ingress controller such as NGINX Ingress Controller, you need some custom configuration of the cluster. Such a configuration file could look like:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    kubeadmConfigPatches:
      - |