Skip to content

Instantly share code, notes, and snippets.

View toxicbloud's full-sized avatar
🏠
Working from home

Antonin toxicbloud

🏠
Working from home
  • Vacances
  • Tatooine
  • 08:22 (UTC +02:00)
View GitHub Profile
@toxicbloud
toxicbloud / GdxTestRunner.java
Created November 21, 2023 09:32
LibGDX Test Runner fot JUnit 5
package com;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.headless.HeadlessApplication;
import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration;
import com.badlogic.gdx.graphics.GL20;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
@toxicbloud
toxicbloud / mail.html
Created May 24, 2022 12:55
HTML Mail reset password template - Jinja 2 compatible
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta content="text/html" http-equiv="Content-Type"/>
<title>{{COMPANYNAME}} - Réinitialisation de mot de passe</title>
<meta name="description" content="{{COMPANYNAME}} - Reset Password Email">
</head>
<body marginheight="0" topmargin="0" marginwidth="0" style="padding: 6em 0px; margin: 0px; background-color: #f2f3f8; font-family: Arial, Helvetica, sans-serif;" leftmargin="0">
<div style="margin: auto; width: 100%; text-align: center; padding: 0px 0px 1em 0px;">
@toxicbloud
toxicbloud / recursiveMaximum.cpp
Last active November 4, 2021 19:51
Fonctions récursives qui retournent le maximum d'un tableau
#include <iostream>
/**
* version triviale
*/
int findMaxRec(int A[], int n)
{
if (n == 1)
return A[0];
return std::max(A[n-1], findMaxRec(A, n-1));
}
@toxicbloud
toxicbloud / discord.js
Last active May 31, 2022 17:53
DiscordJS Welcoming message exemple for multiples server Bots using System messages Channel
client.on("guildMemberAdd", (member) => {
if(member.guild.systemChannelId!=null){
client.channels.cache.get(member.guild.systemChannelId).send(`Bonjour <@${member.id}> bienvenue sur : ${member.guild.name}`)
}else{
console.log('ce serveur n a pas de channel systeme');
}
});