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 / Golang-AI-MicroService-Langgraph-Solution.md
Last active October 29, 2024 16:38
Building a robust microservice registry AI assistant tailored to Go-based system. Here we adapt an [initial LangGraph and Graphiti-based approach](https://github.com/getzep/graphiti/blob/main/examples/langgraph-agent/agent.ipynb) to fit within a Go ecosystem, leveraging alternative technologies and methodologies to achieve similar functionality.

Building a robust microservice registry AI assistant tailored to Go-based system. Here we adapt an initial LangGraph and Graphiti-based approach to fit within a Go ecosystem, leveraging alternative technologies and methodologies to achieve similar functionality.

Objective

  • Goal: Develop an AI assistant for your GitHub/Docker microservice registry service using Go, without relying on Neo4j.
  • Key Components:
    • Data Storage: Replace Neo4j/Graphiti with a suitable alternative (e.g., PostgreSQL).
    • AI Integration: Utilize OpenAI's API or similar services to handle natural language processing.
    • API Development: Build RESTful or GraphQL APIs in Go to interact with the AI assistant.
  • State Management: Implement mechanisms to maintain conversation state and persist interactions.
@Cdaprod
Cdaprod / golang-registry-solution.md
Created October 29, 2024 16:32
Build a robust microservice registry in Golang, with Golang-native solutions, that can be queried by AI.

Build a robust microservice registry in Golang, with Golang-native solutions, that can be queried by AI.

Overview

  • Goal: Build an AI assistant for your microservice registry in Golang, without relying on Neo4j.
  • Challenges: Replace the graph database functionality provided by Neo4j/Graphiti, ensure efficient data storage and retrieval, maintain robust performance, and integrate AI capabilities.

Steps to Achieve a Robust System Without Neo4j

1. Choose an Alternative Data Storage Solution

@Cdaprod
Cdaprod / synology-nas-setup-guide.md
Created October 29, 2024 15:57
A concise guide for preparing a Synology NAS for a distributed MinIO cluster. It covers cleaning the root filesystem, creating a logical volume for Docker, and configuring MinIO for optimal storage management.

This guide fixes Synology root storage issues, migrates Docker storage, and sets up a MinIO node for clustering.

Current Situation Summary:

  • Root Filesystem (/dev/md0):
    • Size: 2.3 GB
    • Used: 1.7 GB
    • Available: 483 MB (79% usage)
  • Data Volume (/volume1):
    • Size: 11 TB
  • Used: 4.8 TB
@Cdaprod
Cdaprod / Pi_TFT_Console_Display.md
Created October 19, 2024 17:38
In this gist, is a **comprehensive, detailed guide** for installing and configuring the **1.14" 240x135 PiTFT** on your Raspberry Pi Zero W2 using the "hard way" method. This guide includes **advanced scripts** to automate the installation, handle updates, and ensure robust configuration management. By following these instructions, you'll set up…

In this gist, is a comprehensive, detailed guide for installing and configuring the 1.14" 240x135 PiTFT on your Raspberry Pi Zero W2 using the "hard way" method. This guide includes advanced scripts to automate the installation, handle updates, and ensure robust configuration management. By following these instructions, you'll set up your PiTFT to display the console seamlessly and maintain its functionality across kernel updates and different Raspberry Pi models.


Table of Contents

  1. Prerequisites
  2. System Preparation
  3. Setting Up Python Virtual Environment (Optional)
  4. Physical Installation of PiTFT
@Cdaprod
Cdaprod / multi-wan-mesh-initializer.md
Created October 19, 2024 16:53
This repository contains the configuration scripts, network management tools, and automation scripts for initializing and managing a Multi-WAN Mesh Network using Raspberry Pi Zero W2 devices. It provides a standardized approach to deploy and manage network-capable devices across various environments, enabling seamless connectivity and centralize…

Multi-WAN Mesh Network Initializer for Raspberry Pi Zero W2

Here I aiming to develop a comprehensive and automated system using a Raspberry Pi Zero W2 (RPiZ2W) as the primary initializer for various network-capable devices across multiple environments. This system will form a Multi-WAN Mesh Network integrated with VPS/VPN services, enabling seamless provisioning, centralized management, and remote access for devices with diverse operating systems (Windows, Linux, FreeBSD, macOS, etc.).


multi-wan-mesh-initializer/
├── ansible/
│   ├── playbooks/
│   │   ├── setup-new-device.yml
@Cdaprod
Cdaprod / claude_3.5_sonnet_artifacts.xml
Created September 30, 2024 21:13 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@Cdaprod
Cdaprod / UDP_GRO_TAILSCALE.md
Created August 30, 2024 22:36
This script configures UDP GRO settings for Tailscale and makes them persistent. Make sure your system meets the requirements, like having `networkd-dispatcher` enabled, before running the script.

Here's a script to configure UDP GRO settings for Tailscale on your device and make them persistent across reboots. You can name this script configure_tailscale_gro.sh.

Script: configure_tailscale_gro.sh

#!/bin/bash

# Determine the network device name
NETDEV=$(ip -o route get 8.8.8.8 | cut -f 5 -d " ")
@Cdaprod
Cdaprod / FIX_TMUX_MULTIPATH_TCP.md
Last active August 13, 2024 03:13
By following these steps, you should be able to resolve the issue with the interface output queue being full after using tmux. If the problem persists, consider reaching out to your network administrator or consulting the Multipath TCP community for further assistance.

Fixing Multipath TCP Queue Full Error After Using tmux

If the issue "shell failed Multipath TCP: The operation couldn't be completed. Interface output queue is full" started after using tmux, it might be related to how tmux handles network connections and output. Here are some steps to address the issue:

Restart tmux:

Restart tmux to clear any internal buffers or queues:

tmux kill-server
@Cdaprod
Cdaprod / StableDiffusion.md
Created August 6, 2024 18:01
By following these steps, I was able to create blended videos using AI-generated images and video editing tools. It’s a fun and creative journey!

Creating blended videos using AI tools like Stable Diffusion can be both fun and rewarding. Here's how I got started:

Step 1: Install Required Software

  1. Stable Diffusion:
    • First, I made sure I had Python installed on my machine.
    • Then, I installed the diffusers library from Hugging Face.
      pip install diffusers[torch]
@Cdaprod
Cdaprod / [notes]neural_network_engineered_parts_from_idea.md
Last active July 10, 2024 02:46
By leveraging these resources and steps, you can build a neural network capable of developing engineered parts from ideas and allow interactive design modifications through human input.

To build a neural network that can develop engineered parts from an idea, you need a diverse and well-annotated dataset. Here are the properties and considerations for the dataset:

1. Data Types

  • Textual Descriptions:

    • Detailed descriptions of mechanical parts, their functions, materials, and constraints.
    • Examples: "A hinge that allows a door to swing open and close, made of stainless steel, with a 90-degree rotation limit."
  • 2D Drawings/Sketches:

  • Hand-drawn sketches or technical drawings of parts.