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
@Cdaprod
Cdaprod / DOC.md
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
Cdaprod / Python_DevOps_Funcs.md
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
Cdaprod / Pfsense_DHCP_Over_API.md
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 `192.168.0.1` using the API:

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

Fetching DNS Host Overrides

Use the following curl command to fetch DNS Host Overrides:

curl -X GET "http://192.168.0.1/api/v1/services/dnsmasq/host_override" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key"
@Cdaprod
Cdaprod / minio-weaviate-ts.md
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.

docker-compose.yml

version: '3.8'

# Set Variables: TS_AUTHKEY, TS_CERT_DOMAIN, MINIO_DOMAIN, MINIO_BROWSER_REDIRECT_URL, MINIO_ROOT_USER, MINIO_ROOT_PASSWORD, WEAVIATE_ORIGIN
# Configuration Files: TS_SERVE_CONFIG
@Cdaprod
Cdaprod / Ghost-Docker-Deployment.md
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
Cdaprod / My Dev Tools.md
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

Description:

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.

Implementation:

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

@Cdaprod
Cdaprod / contrib_llm_dev.md
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
Cdaprod / debian_fixing_apt.md
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
@Cdaprod
Cdaprod / Network_and_Service_Discovery_Algorithm.md
Created May 30, 2024 21:26
This abstracted algorithm focuses on the core logic required to discover network services and machines, leveraging BFS for discovery and maintaining a graph representation for the network.

Sure, let's focus on a network service and machine discovery algorithm. This can be particularly useful in scenarios such as network monitoring, management, or when deploying services in dynamic environments like cloud infrastructure or microservices.

Algorithm for Network Service and Machine Discovery

Initialize

  1. Initialize Network:

    • Create a data structure to represent the network (e.g., a graph G).
    • Initialize a discovery queue Q.
  2. Set Up Initial Discovery:

@Cdaprod
Cdaprod / git_hook_hydrate_repo.md
Created May 29, 2024 05:48
By setting up customized Git hooks, you can automate validation, testing, dependency updates, and notifications for your MinIO deployment repository. These hooks help maintain code quality and streamline your development workflow. Adjust the examples to fit your specific needs and tools used in your project.

Customized Git hooks can significantly enhance the workflow of your cdaprod/hydrate repository, especially for your MinIO deployment. Here are some tailored hooks you might find useful:

Pre-Commit Hook

A pre-commit hook can ensure that your configuration files (e.g., Docker Compose, environment files) are correctly formatted and validated before a commit.

Example: Validate Docker Compose File

#!/bin/sh
# Pre-commit hook to validate Docker Compose file