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 / 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
@Cdaprod
Cdaprod / docker_tpu_network_camera_stream.md
Created May 27, 2024 20:42
This gist contains instructions for setting up a Docker container on a Windows desktop to stream video from a USB-C connected camera over the local network and to utilize TPU acceleration for real-time image recognition using a Coral USB TPU. The setup includes creating Dockerfiles for video streaming and TPU-accelerated image recognition, build…

Part 1: Docker Network Camera Stream

To set up a Docker container on your Windows desktop that is connected to a camera via a USB-C capture card and make the video stream available on the local network, follow these steps:

Step 1: Set Up Docker on Windows

  1. Install Docker Desktop: Download and install Docker Desktop for Windows from Docker's official site.
  2. Enable WSL 2: Ensure that WSL 2 (Windows Subsystem for Linux) is enabled, as Docker Desktop uses it to run containers on Windows.

Step 2: Connect Your Camera via USB-C Capture Card

Ensure your camera is properly connected to your computer via the USB-C capture card and is recognized by the system.

@Cdaprod
Cdaprod / xaio-seeed-round-display-camera-and-esp.md
Created May 24, 2024 19:46
This approach splits the workload, allowing the ESP32-CAM to handle image capture while the ESP32 with CircuitPython focuses on displaying the images.

Using CircuitPython to connect a camera to an ESP32 and display the output on a XIAO round display involves a different setup since CircuitPython has its own libraries and methods for handling hardware interactions.

Components Needed:

  1. ESP32-S2/S3: A compatible ESP32 variant that can run CircuitPython and interface with a camera (if supported).
  2. XIAO Round Display: A small round display that supports SPI communication.
  3. Camera Module: Such as an OV2640, though direct support in CircuitPython is limited.
  4. Connecting Wires: To connect the display and camera to the ESP32.

Steps to Set Up:

@Cdaprod
Cdaprod / google-coral-edge-tpu-iphone-camera.md
Created May 24, 2024 19:45
By following these steps, you can use your Google Coral Edge TPU with an iPhone camera for edge AI applications. Adjust the code and preprocessing steps according to your specific use case and model requirements.

Using a Google Coral Edge TPU with an iPhone camera involves several steps and requires a compatible setup. Here’s how you can approach it:

  1. Hardware Requirements:

    • Google Coral Edge TPU (USB Accelerator).
    • An iPhone with a camera.
    • A computer or a Raspberry Pi to act as an intermediary device between the iPhone and the Coral Edge TPU.
  2. Software Requirements:

    • Python installed on the intermediary device.
    • Libraries like OpenCV for capturing video streams.
@Cdaprod
Cdaprod / Rpi_Wifi_Cloud_Pre_Allocation_Method.md
Last active May 23, 2024 22:32
By utilizing these tools and integrating them into your workflows, you can build robust CI/CD pipelines, automate backups, and seamlessly manage your applications both in the cloud and locally.

To give your Raspberry Pi Zero W 2 the ability to connect to the internet for updating packages and other tasks, you can set it up to use a Wi-Fi connection. Here’s a step-by-step guide to achieve this:

1. Set Up Wi-Fi on Raspberry Pi Zero W 2

Method 1: Using raspi-config (Recommended for New Users)

  1. Open Terminal:

    • Connect to your Raspberry Pi Zero W 2 either via a directly connected display and keyboard or through SSH if it’s already on the network.
  2. Run raspi-config:

File 1: Pfsense_FreeBSD_Tailscale.md

Tailscale on pfSense

To install Tailscale on pfSense, follow these steps adapted from OPNsense instructions:

Installation

  1. Access the Shell: Connect to the pfSense console via SSH or through the web interface. Navigate to Diagnostics > Command Prompt, and select the "Execute Shell Command" option.
@Cdaprod
Cdaprod / Pfsense_FreeBSD_Tailscale.md
Last active May 23, 2024 21:55
These documents assist in the development of various hardware and services such as: Pfsense, Tailscale, Raspberry Pi, Ubuntu, WiFi, Bluetooth

To install Tailscale on pfSense, you can follow the instructions provided for OPNsense with slight modifications. Here's how you can adapt the process for pfSense:

Installation

  1. Access the Shell: Connect to the pfSense console via SSH or through the web interface. From the web interface, navigate to Diagnostics > Command Prompt, and select the "Execute Shell Command" option.

  2. Download the Ports Tree: pfSense, like OPNsense, is based on FreeBSD. However, pfSense does not have the opnsense-code command. Instead, you need to manually fetch and extract the ports tree:

    fetch https://github.com/freebsd/freebsd-ports/archive/refs/heads/main.zip