Skip to content

Instantly share code, notes, and snippets.

View AldeRoberge's full-sized avatar
💛

Alexandre D. Roberge AldeRoberge

💛
View GitHub Profile
@AldeRoberge
AldeRoberge / print-keyboard-keys.py
Created August 6, 2026 13:44
A Python uti.ity to debug print keys. It helped me solve an issue where a keyboard stuck in 'Verr' mode. Fn + Verr was the fix. Wrote by Claude Sonnet 5 Medium in 3 prompts.
"""
keyboard_debug.py
------------------
Outil de debug clavier pour Windows utilisant l'API Raw Input (WM_INPUT).
Ce script capte CHAQUE evenement clavier brut envoye par Windows, avant
tout remapping logiciel, et affiche :
- Le peripherique HID exact qui a envoye la touche (utile si tu as
plusieurs claviers/recepteurs branches)
- Le scan code brut (le vrai code materiel envoye par le clavier)
@AldeRoberge
AldeRoberge / gist:7dcb7d712e6a54b3a59a058d636b4a08
Created July 27, 2026 14:06
Turn Excel addresses into longitude latitude so you can then import them in Google My Maps to build a itinary.
#!/usr/bin/env python3
"""
Geocode the full contact/address table and write coordinates back out.
SETUP (same as before)
-----------------------
1. Geocoding API must be ENABLED on the project.
2. Billing must be ON.
3. Key restricted by IP (not HTTP referrer), API restriction = Geocoding API.
4. Set the key:
L’été est enfin arrivé et, si tu veux profiter de ta piscine, attends un instant ! (Transition*) Avant de plonger, prends quelques minutes pour vérifier si ton installation est conforme.
Savais-tu qu’il existe un outil vraiment pratique pour t’aider ? Le gouvernement du Québec met à ta disposition un formulaire d’autoévaluation simple et rapide à remplir.
Que tu aies une piscine hors terre, creusée ou même démontable, des normes provinciales s’appliquent. Pour assurer la sécurité de ta famille, de tes amis et de tous ceux qui profitent de ton plan d’eau, prends le temps de vérifier les accès à la piscine, la hauteur des clôtures ainsi que certaines distances et mesures de sécurité requises.
Le formulaire te guidera étape par étape pour faire cette vérification.
Pour en savoir davantage, consulte la page de la sécurité des piscines résidentielles du gouvernement du Québec.
On te souhaite un excellent été et une bonne Semaine nationale de la prévention de la noyade!
@AldeRoberge
AldeRoberge / find-404.ps1
Last active June 4, 2026 20:14
Find 404 links, crawls a website and checks if links are broken. Written by Claude Sonnet 4.6 (low/high) after 35+ prompts.
#Requires -Version 5.1
<#
.SYNOPSIS
Dead Link Checker - Crawls a website and reports broken links, with Google-powered suggested replacements.
.PARAMETER StartUrl Root URL to crawl. Omit to reuse last saved URL.
.PARAMETER MaxDepth Max crawl depth (default 3).
.PARAMETER MaxParallel Max concurrent requests (default 10).
.PARAMETER OutputCsv CSV output path (default .\dead-links-<timestamp>.csv).
.PARAMETER SameDomainOnly Stay on same domain (default $true).
.PARAMETER TimeoutSec Request timeout seconds (default 15).
@AldeRoberge
AldeRoberge / Google-Cloud-Gemini-API-In-CSharp.md
Created March 26, 2026 14:55
Using Google Cloud Gemini Image API in C#

There's no wrapper for Google Cloud Gemini API in C# as of now.

Here's how to call the rest API using C#.


🔑 1. Authentication (OAuth2)

private async Task<string> GetAccessTokenAsync()
using System;
using System.Collections;
using System.IO;
using System.Runtime.InteropServices;
using FMOD;
using FMOD.Studio;
using FMODUnity;
using JetBrains.Annotations;
using UnityEngine;
using Debug = UnityEngine.Debug;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Webp;
namespace ImageSharp.Converter;
/// <summary>
/// Converts PNG images to WebP format using ImageSharp library.
/// Scans a target directory (defaults to current working directory) recursively.
/// </summary>
abstract class ConvertToWebP
@AldeRoberge
AldeRoberge / podman-shim-for-docker.md
Last active March 18, 2026 14:34
Podman shim for Docker

Using Podman with .NET Aspire's Publish Pipeline

Aspire's publish pipeline calls docker directly and crashes — even if you have Podman installed and ASPIRE_CONTAINER_RUNTIME=podman set.

Why It Happens

ASPIRE_CONTAINER_RUNTIME only controls container image builds. The publish pipeline's compose steps (docker-compose-down, docker-compose-up) doesn't seem to work with podman right now (as of 2026-03-18, 13.1.2).

The Fix: A Docker Shim

@AldeRoberge
AldeRoberge / YouTubeFinder.cs
Created November 4, 2025 20:33
Allows to find a list of YouTube videos based on their titles.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
namespace YouTubeFinder
@AldeRoberge
AldeRoberge / Chocolatey.bat
Created October 25, 2025 00:47
List of great programs you can mass install with Chocolatey :)
@echo off
choco install googledrive --yes
choco install clickup-official --yes
choco install screentogif.install --version=2.35.2 --yes
choco install github-desktop --yes
choco install unity-hub --yes
choco install sublimetext4 --yes
choco install nvidia-broadcast --yes