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 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: troy@aperim.com

@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

@troykelly
troykelly / README.md
Last active September 22, 2024 01:59
Cleans up old files regularly.

Clean Old Files Utility

This utility provides a configurable way to clean up old files in specified directories on Debian systems. The clean-old-files script checks directories for files older than a configurable number of hours and removes them, excluding specified files and patterns. All actions, warnings, and errors are logged to the local syslog and outputted to STDERR.


Table of Contents

@troykelly
troykelly / camera-reboot.sh
Created September 21, 2024 05:45
Reboots cheap Aliexpress et. al. "box" cameras
#!/usr/bin/env bash
#
# reset_camera.sh
#
# Purpose:
# A Bash script to log in to and reset a web camera.
# To reset the camera, the script must first log in and then set appropriate
# cookies and send the reboot subject and XML payload.
#
# Author: Troy Kelly
@troykelly
troykelly / README.md
Last active July 29, 2026 14:28
Multi Screen Video Playback using ffplay

Stream.sh

stream.sh is a Bash script designed to stream multiple video sources to multiple screens using ffplay. This script ensures that each video stream is displayed on a specified monitor and restarts the stream if it fails. The script is optimized for real-time playback by using various ffplay options to reduce latency and handle frame drops effectively.

Features

  • Streams multiple video sources to multiple screens.
  • Ensures each stream is displayed on the specified monitor.
  • Restarts streams automatically if they fail.
  • Optimized for real-time playback with minimal latency.