Skip to content

Instantly share code, notes, and snippets.

View AldeRoberge's full-sized avatar
💛
.

Alexandre D. Roberge AldeRoberge

💛
.
View GitHub Profile
@AldeRoberge
AldeRoberge / DateTimeTestingExtensions.cs
Created June 29, 2025 02:32
Adds Shouldly shoulds for DateTime.
using Shouldly;
namespace ADG.Server.AppHost.Tests.Utilities;
public static class DateTimeTestingExtensions
{
public static void ShouldBeAfter(this DateTime actual, DateTime expected)
{
if (actual <= expected)
throw new ShouldAssertException($"Expected {actual} to be after {expected}");
@AldeRoberge
AldeRoberge / Short-Form-Video-Trauma-Processing.md
Created June 4, 2025 15:36
Short Form Video as a Trauma Processing Inhibitor: A Clinical Study

Instagram Reels as a Trauma Processing Inhibitor: A Clinical Study

Abstract

This study investigates whether habitual use of short-form video platforms—specifically Instagram Reels—may inhibit trauma processing in individuals exposed to adverse experiences. By combining qualitative interviews with psychometric data and usage analytics, the study aims to explore the hypothesis that compulsive engagement with Reels serves as a dissociative coping mechanism, potentially delaying or impeding emotional integration and trauma recovery.


1. Introduction

@AldeRoberge
AldeRoberge / Fermentation-Algorithmique.md
Last active May 29, 2025 19:57
La fermentation algorithmique

🧠 La fermentation algorithmique

La fermentation algorithmique est un processus d’adaptation progressive d’un algorithme de recommandation, déclenché par une réduction volontaire, mais non totale, de l'interaction avec une plateforme (ex. TikTok, YouTube, Instagram Reels).

Plutôt que de couper l’usage complètement, l’utilisateur adopte une posture d’interactions lentes, espacées et réfléchies :

  • 📉 Moins de sessions, moins de scroll impulsif
  • 🧠 Interactions uniquement avec du contenu réellement intéressant
  • 🕰️ Attente prolongée pour permettre à l’algorithme de recalculer ses priorités
@AldeRoberge
AldeRoberge / RotationFollowSmooth.cs
Created May 21, 2025 20:39
Allows to rotate an object around the target (a VR camera in my case).
using Sirenix.OdinInspector;
using UnityEngine;
public class RotationFollowSmooth : MonoBehaviour
{
[SerializeField, BoxGroup("References"), Required]
private Transform _target;
[BoxGroup("Settings")]
[SerializeField, BoxGroup("Settings/Rotation"), Required]
@AldeRoberge
AldeRoberge / mouse-move-continuously-to-right.ahk
Created May 21, 2025 18:40
A AHK script to move the mouse continuously to the right. Will stop when end of screen reached. Shift + L to start or restart. Shift + ESC to quit.
#Requires AutoHotkey v2.0
CoordMode "Mouse", "Screen"
; Settings
moveSpeed := 5 ; Time in ms between movements
stepSize := 2 ; Pixels per step
; Global state
moving := true
@AldeRoberge
AldeRoberge / net-aspire-serilog-colors-in-console.md
Last active April 28, 2025 17:57
Fix colors in .NET Aspire console and Serilog

Black and white .NET Aspire console? Worry no more. Use this :

applyThemeToRedirectedOutput: true

Full code example, taken from ADG's Logging helper method :

@AldeRoberge
AldeRoberge / OllamaVisionDemo.cs
Created April 18, 2025 02:46
Captures an image from the webcam and quickly analyzes whether a person is present.
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.AI;
using OpenCvSharp;
using AForge.Video.DirectShow;
namespace ADG.Playground.Vision
{
internal class VisionResponse
{
@AldeRoberge
AldeRoberge / ConsoleSpiner.cs
Created April 15, 2025 19:56
Just a cute little spinner that looks great 😎👍
using System.Text;
namespace ADG.ConsoleSpin;
public static class ConsoleSpinner
{
private static int counter;
private static readonly string[] SpinnerChars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; // Braille characters that work reliably
@AldeRoberge
AldeRoberge / daily-schedule-graph.py
Created March 27, 2025 13:48
A graph of my daily schedule, written in python (matplotlib)
import matplotlib.pyplot as plt
import numpy as np
def time_to_hours(time_str, start_hour=None):
"""
Convert a time string "HH:MM" to a float representing hours.
If the time is "00:00" and start_hour is provided and greater than 0,
assume that it represents midnight at the end of the day (i.e., 24:00).
"""
h, m = map(int, time_str.split(":"))
@AldeRoberge
AldeRoberge / Program.cs
Created February 18, 2025 15:52
Automatically publish projects to Nuget, ensure that their versions match
using System.Diagnostics;
using System.Text;
using System.Text.Json;
using System.Xml.Linq;
using AGX.Common.Logging.Serilog;
using Serilog;
namespace AGX.Common.Publishing
{
internal class Program