Skip to content

Instantly share code, notes, and snippets.

View elbruno's full-sized avatar
💭
@Home rocking some AI projects

El Bruno elbruno

💭
@Home rocking some AI projects
View GitHub Profile
@elbruno
elbruno / aspireprompthuggingfacegenai.md
Created July 22, 2025 18:09
aspireprompthuggingfacegenai.md

GitHub Copilot Agent Prompt: Add Hugging Face MCP Server Integration to Blazor Web App

Overview

Transform the existing .NET Aspire Blazor web application to integrate with the Hugging Face MCP (Model Context Protocol) Server for AI image generation and text responses.

Context

  • Starting with a .NET Aspire solution containing 4 projects: ApiService, AppHost, ServiceDefaults, and Web (Blazor)
  • Web project currently has basic Weather and Counter pages (to be removed)
  • Need to add AI capabilities using Hugging Face MCP Server
@elbruno
elbruno / eShopLite_ShoppingCart_PRD.md
Created July 6, 2025 15:13
eShopLite_ShoppingCart_PRD.md

Product Requirements Document (PRD)

Shopping Cart Feature for eShopLite Application

Document Information

  • Product: eShopLite - Semantic Search Application
  • Feature: Shopping Cart Functionality
  • Version: 1.0
  • Date: July 5, 2025
  • Status: Draft
@elbruno
elbruno / alttextgenerator.cs
Created June 25, 2025 14:52
alttextgenerator.cs
#:package [email protected]
using OllamaSharp;
// set up the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);
ollama.SelectedModel = "gemma3";
var chat = new Chat(ollama);
@elbruno
elbruno / PromptGameConsole.cs
Created June 18, 2025 17:32
PromptGameConsole.cs
// C# Console Project: Space Invaders-style Game — Title: Space.AI.NET()
// This prompt is for GitHub Copilot Agent Mode, starting from an empty C# console project.
// Objective:
// Build a modular, flicker-free, color-rendered console game titled "Space.AI.NET()".
// The game must support input handling, player/enemy movement and bullets, UI, screenshot capture, double-buffered rendering, and a polished start screen layout.
// FILE: Program.cs
// Responsibilities:
// - Set UTF-8 output encoding for box-drawing characters:
@elbruno
elbruno / vscode.dotnerun.launch.json
Created June 5, 2025 16:32
vscode.dotnerun.launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET: run Active File",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "${file}"],
"cwd": "${workspaceFolder}",
@elbruno
elbruno / alttextgenimage-run.cs
Created May 29, 2025 17:22
alttextgenimage-run.cs
#:package [email protected]
using OllamaSharp;
// set up the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);
ollama.SelectedModel = "gemma3";
var chat = new Chat(ollama);
@elbruno
elbruno / readrssfeedusingnet10.cs
Last active May 28, 2025 19:34
readrssfeedusingnet10.cs
#:package CodeHollow.FeedReader@1.*
using CodeHollow.FeedReader;
var feed = await FeedReader.ReadAsync("https://elbruno.com/feed/");
foreach (var item in feed.Items.Take(5).ToList())
{
Console.WriteLine($"- {item.Title}");
}
@elbruno
elbruno / genainet_showghtoken.cs
Last active April 3, 2025 14:04
genainet_showghtoken.cs
using Azure;
using Azure.AI.Inference;
using Microsoft.Extensions.AI;
// uncomment this line to see your GitHub Token
// Console.WriteLine($"GITHUB_TOKEN: {Environment.GetEnvironmentVariable("GITHUB_TOKEN")}");
IChatClient client = new ChatCompletionsClient(
endpoint: new Uri("https://models.inference.ai.azure.com"),
@elbruno
elbruno / ImageGenOpenAIAPITest.cs
Created March 27, 2025 15:38
ImageGenOpenAIAPITest.cs
using Microsoft.Extensions.AI;
using Microsoft.Extensions.Configuration;
using OpenAI;
using System.Reflection;
// 1. get the image
var imageLocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "images", "petsmusic.png");
var mediaType = GetMediaType(imageLocation);
byte[] imageBytes = File.ReadAllBytes(imageLocation);
@elbruno
elbruno / removeaudiofromvideo.py
Created July 26, 2024 18:45
removeaudiofromvideo.py
# Copyright (c) 2024
# Author : Bruno Capuano
# Change Log :
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell