Skip to content

Instantly share code, notes, and snippets.

View troykelly's full-sized avatar
💭
I may be slow to respond.

Troy Kelly troykelly

💭
I may be slow to respond.
View GitHub Profile
@troykelly
troykelly / README.md
Last active February 28, 2025 01:25
This Python script verifies that a load balancer (LB) cluster is functioning properly.

Load Balancer Checker

Author: Troy Kelly
Date: 27th February 2025

This Python script verifies that a load balancer (LB) cluster is functioning properly by:

  1. Resolving DNS for:
    • HTTP via A/AAAA records
  • HTTPS via SVCB/HTTPS records if present, else falling back to A/AAAA
--- /home/vscode/.local/lib/python3.11/site-packages/octodns_cloudflare/__init__.py 2025-01-28 23:37:03.687375946 +0000
+++ /workspaces/dns/temp-cloudflare-patch/__init__.py 2025-01-28 23:40:24.543880502 +0000
@@ -1072,33 +1072,87 @@
self._try_request('DELETE', path)
def _apply_Delete(self, change):
+ """
+ Delete an existing record (DNS record or Pagerule) in Cloudflare.
+
+ Raises CloudflareError if critical data (e.g., zone_id, record id) is missing,
@troykelly
troykelly / README.md
Last active January 17, 2025 04:36
This script is designed to validate and, if necessary, correct the system’s configured Fully Qualified Domain Name (FQDN) on Debian/Ubuntu (and similar) systems.

check_fqdn.sh

This script is designed to validate and, if necessary, correct the system’s configured Fully Qualified Domain Name (FQDN) on Debian/Ubuntu (and similar) systems. It:

  1. Checks if the current operating system is a Debian/Ubuntu (APT-based) distribution.
  2. Ensures required system commands are installed, attempting silent installation via apt-get if necessary.
  3. Identifies the default route’s interface for both IPv4 and IPv6.
  4. Retrieves the primary global (i.e., non-local) IPv4 and IPv6 addresses on those interfaces.
  5. Performs reverse DNS lookups on those local addresses to determine their FQDNs.
  6. Ensures that the forward DNS record for that FQDN matches both IP addresses.
@troykelly
troykelly / README.md
Last active April 22, 2025 09:40
This script installs and configures auditd on Debian-based systems to log all executed commands—including those run locally (on TTY/console) and over SSH. By monitoring all execve calls, it ensures you have complete visibility into every command executed on the system.
@troykelly
troykelly / README.md
Last active November 2, 2024 11:08
Install Script

Installation Script Documentation

Overview

The install.sh script is designed to bootstrap a new virtual machine (VM) by performing various system configurations and installations. It can execute locally or bootstrap remote servers by connecting via SSH and executing the script remotely. This script automates the setup process, ensuring consistency and reducing manual intervention.


Author: Troy Klly
Contact: [email protected]

@troykelly
troykelly / example.zshrc
Created November 2, 2024 03:02
Default zshrc
# Set path if required
#export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
# Aliases
alias ls='ls --color=auto'
alias ll='ls -lah --color=auto'
alias grep='grep --color=auto'
alias ec="$EDITOR $HOME/.zshrc" # edit .zshrc
alias sc="source $HOME/.zshrc" # reload zsh configuration

LLM.py - Interactive Assistant for OpenAI API Integration

llm.py is a command-line tool that facilitates interactions with the OpenAI API. It manages conversation states, updates code files based on responses from Large Language Models (LLMs), and streamlines the development workflow by integrating AI assistance directly into your codebase.

Features

@troykelly
troykelly / README.md
Created October 7, 2024 01:59
Bulk Cloudflare Encryption Mode Management Script

Cloudflare Encryption Mode Management Script

This script retrieves the list of domains from a Cloudflare account using the provided API credentials, checks their current encryption modes, and optionally updates them based on user input. A markdown report is generated displaying previous and updated statuses.

Requirements

  • Bash (Unix shell)
  • curl command-line tool
  • jq JSON processor
@troykelly
troykelly / README.md
Last active September 30, 2024 07:13
Docker IPv6 Support on Debian 12

Install Docker on Debian 12 Headless Machines

This script automates the installation of Docker on Debian 12 headless machines, including the configuration of IPv6 settings and required packages. It performs validation checks, installs necessary components, and generates a markdown-formatted installation report.

Prerequisites

  • A Debian 12 headless machine.
  • A user account with sudo privileges that does not require a password for sudo commands.

Important Notice