Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
Learn something new everyday!

David Cdaprod

Learn something new everyday!
View GitHub Profile

Integrating the Python module in pfSense's DNS Resolver (Unbound) with an OpenAI API call can open up a range of advanced functionalities. For example, you can dynamically analyze DNS queries and responses, filter content, or log and process data for further analysis. Here's how you can set this up to do something "awesome."

Example Use Case: Intelligent Content Filtering with OpenAI

Let's create a scenario where you want to filter DNS queries based on the content of the domains being requested. We'll use OpenAI's API to analyze the domain names and decide whether to allow or block the requests.

Step-by-Step Guide

1. Create an OpenAI Account and Obtain API Key

Cdaprod /
Created June 19, 2024 19:29
By following these steps, you can automate the process of capturing images of each page and compile them into a single PDF using your Nikon Z7, a stepper motor-driven feeder, and a Raspberry Pi.

To automate the process of capturing images of each page using your Nikon Z7, a stepper motor-driven paper feeder, a capture card, and a Raspberry Pi (RPi), you can follow these steps:

Hardware Setup

  1. Nikon Z7 Camera: Mount it on a tripod positioned above the paper feeder.
  2. Stepper Motor: Connect the stepper motor to your paper feeder to automate the feeding of each page.
  3. Capture Card: Connect your Nikon Z7 to the Raspberry Pi using an HDMI capture card.
  4. Raspberry Pi: Use it to control both the stepper motor and the camera.

Software and Libraries

  1. gPhoto2: To control the Nikon Z7 from the Raspberry Pi.
Cdaprod /
Last active June 17, 2024 18:50
Install Kubernetes on Ubuntu

Based on the information gathered from multiple sources, it appears that using a /24 CIDR for the Weave Net pod network should work, but there are a few considerations to ensure proper configuration.

Key Steps to Configure Weave Net with a /24 CIDR

  1. Remove Incorrect Repository and Add Correct One: Ensure you remove any existing incorrect Kubernetes repositories and add the correct one for your version of Ubuntu.

  2. Disable Swap: Disabling swap is necessary for Kubernetes to function correctly.

Cdaprod /
Created June 14, 2024 22:17
More cool Python funcs with a devops spin

Based on the search results, here are some enhanced and cool DevOps examples using exec(), permutations(), partial(), choice(), and askopenfilename() in Python:

1. exec()

Dynamic Infrastructure Management Using exec(), you can dynamically manage infrastructure code, making it adaptable to different environments or scenarios.

# Define a dynamic configuration script
config_script = """
Cdaprod /
Last active June 13, 2024 20:53
Here's how you can fetch your DNS and DHCP records from your pfSense box with IP address `` using the API:

Here's how you can fetch your DNS and DHCP records from your pfSense box with IP address using the API:

Fetching DNS Host Overrides

Use the following curl command to fetch DNS Host Overrides:

curl -X GET "" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key"
Cdaprod /
Created June 13, 2024 19:36
This setup allows you to deploy MinIO and Weaviate servers with dedicated Tailscale containers, ensuring secure connectivity and integration within your tailnet. The bash functions and aliases make it easy to interact with these services from the command line.

Here's the updated docker-compose.yml file for deploying MinIO and Weaviate servers, each with a dedicated Tailscale container. This setup ensures that both services are accessible over your Tailscale tailnet with the appropriate environment variables and configurations.


version: '3.8'

# Configuration Files: TS_SERVE_CONFIG
Cdaprod /
Created June 13, 2024 19:32
To deploy a Ghost blog using the command line interface (CLI), follow these steps:

To deploy a Ghost blog using the command line interface (CLI), follow these steps:

Step 1: Install Docker and Docker Compose

Make sure Docker and Docker Compose are installed on your machine. If not, follow the installation instructions from the Docker website and Docker Compose installation page.

Step 2: Set Up the Project Directory

Create a directory for your Ghost blog project:

mkdir ghost-blog
cd ghost-blog
Cdaprod / My Dev
Last active June 13, 2024 02:20
These steps provide a cohesive setup with MinIO, Weaviate, and Tailscale, along with the necessary tools for your DevOps and AIOps tasks.

Setting Up CLI and Python Integration for MinIO and Weaviate in a Hybrid Cloud Environment


This guide provides detailed instructions for configuring a cohesive multi-server interface architecture using Tailscale, MinIO, Weaviate, GitHub, Python, and Docker/KinD within a hybrid cloud environment. It includes steps to install necessary tools, create Python scripts for interacting with MinIO and Weaviate, and define bash functions and aliases for streamlined CLI operations. The provided scripts and commands ensure seamless file uploads to MinIO and indexing in Weaviate, enhancing your DevOps and AIOps workflows.


Here’s how to configure your environment with the specified settings for GitHub, MinIO, and Weaviate.

Cdaprod /
Created June 5, 2024 19:57
Explains my passion for AI development and what my specialties are.

Contributing to LLM Development: Key Areas and Expertise

Hey team,

I'm excited about the opportunity to contribute to our LLM development project. Here are some areas where I believe I can add significant value based on my experience and passion for integration and application layer development.

1. Data Management and Storage

Integrate MinIO for Efficient Data Handling

Cdaprod /
Last active June 4, 2024 17:20
This guide should help anyone facing APT key issues on their Debian-based systems, including Raspberry Pi OS and CasaOS.

Resolving APT Key Issues on Debian-based Systems

Overview: This guide walks you through fixing the common APT key issues that might occur during package installation on Debian-based systems, such as Raspberry Pi OS. It covers updating system keys, resolving deprecated key issues, and ensuring your system is properly set up to install necessary packages.

Table of Contents:

  1. Introduction
  2. Understanding APT Key Issues
  3. Step-by-Step Fix for APT Key Issues
  4. Conclusion