Skip to content

Instantly share code, notes, and snippets.

View thimslugga's full-sized avatar
:octocat:

Adam Kaminski thimslugga

:octocat:
View GitHub Profile
@thimslugga
thimslugga / 00-proxmox-8-ec2-cloud-config.yaml
Last active July 30, 2024 19:37
Proxmox 8 on EC2 Bare Metal
#cloud-config
# vim: syntax=yaml
disable_ec2_metadata: false
# Runs on each boot
bootcmd:
# Replace default 127.0.0.1 IP in /etc/hosts with private IP address
- sed -i'' 's/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\([[:space:]]*[{]{fqdn}}\)/{{ ds.meta_data.local_ipv4 }}\1/' /etc/cloud/templates/hosts.debian.tmpl
@thimslugga
thimslugga / modify_screensharing.sh
Created July 24, 2024 10:20 — forked from timsutton/modify_screensharing.sh
Enabling screen sharing on macOS Monterey as of 12.1 beta 2
#!/bin/bash
# A cleaner alternative to this approach, but which requires a restart, is to populate TCC's SiteOverrides.plist inside
# the TCC app support directory with the following:
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
# <key>Services</key>
# <dict>
@thimslugga
thimslugga / aws-ec2-sanitize-ami.sh
Last active May 3, 2025 02:29
Run this script to sanitize your instance after baking AMIs
#!/usr/bin/env bash
#set -ex
# Usage: bash <(curl -sL https://gist.github.com/thimslugga/<>/sanitze-clean.sh)
#
# https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html-single/configuring_and_managing_cloud-init_for_rhel_8/index
# https://docs.aws.amazon.com/imagebuilder/latest/userguide/security-best-practices.html
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/building-shared-amis.html
# https://github.com/aws/amazon-ecs-ami/blob/main/scripts/cleanup.sh
# https://github.com/awslabs/amazon-eks-ami/blob/main/templates/shared/provisioners/cleanup.sh
@thimslugga
thimslugga / .editorconfig
Last active April 5, 2025 23:21
Marp notes - Easy Presentations in Markdown
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
@thimslugga
thimslugga / README.md
Created April 24, 2024 17:28 — forked from YOU54F/README.md
Apple Silicon and Virtual Machines: Beating the 2 VM Limit
@thimslugga
thimslugga / asrock_rack_x470d4u2-2t.txt
Created April 11, 2024 16:15
iommu group output from X470D4U2-2T
# ./lsiommu
IOMMU Group 0 00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 10 00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 11 00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
IOMMU Group 12 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
IOMMU Group 12 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
IOMMU Group 13 00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 0 [1022:1440]
IOMMU Group 13 00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 1 [1022:1441]
IOMMU Group 13 00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Da
@thimslugga
thimslugga / 01-linux_support_cheatsheet.md
Last active November 10, 2025 13:12
Linux Support Cheatsheets

Linux Support Cheatsheet

OS

date -u

cat /etc/os-release

uname -r
@thimslugga
thimslugga / 00-notes.md
Last active March 7, 2024 18:21
Ubuntu Snap of MSSQL Server 2022

Notes

Manual Installation

sudo su -

apt-get update -y && apt-get upgrade -qqy
snap refresh
@thimslugga
thimslugga / aws-ubuntu-ram-boot.yml
Last active August 9, 2024 04:27
aws-ubuntu-ram-boot.yml
#cloud-config
bootcmd:
- |
/bin/bash <<-'EOS'
#!/bin/bash
exec > >(tee /root/log.txt)
exec 2>&1
set -ex
if [ -e /new ]; then
# avoid loops