Skip to content

Instantly share code, notes, and snippets.

View GregoireHebert's full-sized avatar
:octocat:
Probably somewhere sipping a beer

Grégoire Hébert GregoireHebert

:octocat:
Probably somewhere sipping a beer
View GitHub Profile
@GregoireHebert
GregoireHebert / fougere.html
Last active November 21, 2018 22:44
La fougère de Barnsley
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="la fougère de Barnsley">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fougère de Barnsley</title>
</head>
<body>
<canvas id="fougere" width="600" height="600"></canvas>
@GregoireHebert
GregoireHebert / lissajous.html
Last active November 25, 2021 09:26
Table des courbes de Lissajous
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Table de courbes de Lissajous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Table de courbes de Lissajous</title>
<style type="text/css">
body { background-color: black; }
</style>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Pong">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pong</title>
<style type="text/css">
canvas { background-color: black; }
@GregoireHebert
GregoireHebert / ApiResourcesConvertConfigurationCommand.php
Last active November 3, 2022 14:11
Transform ApiResource configuration to XML
<?php
declare(strict_types=1);
namespace App\Command;
use App\Command\DataTransformers\XmlTransformer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@GregoireHebert
GregoireHebert / niceClock.html
Last active May 17, 2019 13:45
A digital clock made of analog clocks
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
* {
margin: 0;
padding: 0;
border: 0;
}
@GregoireHebert
GregoireHebert / Greeting.php
Created April 7, 2020 15:32
API-Platform calculated fields
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

@GregoireHebert
GregoireHebert / API-Platform-2.6-admin-login.md
Last active February 17, 2021 13:55
How to create a login experience from the admin with API Platform 2.6

Creating a login experience from the Admin with API Platform 2.6

You can use whatever authentication mode you want, but for the sake of the demonstration let's use JWT.

I'll grab a freshly downloaded api-platform distribution.

from the php container :

	composer require jwt-auth
	apk add openssl
// https://pastebin.com/kVeMjwjx
# endpoints publics
renouvellement de mot de passe
connexion
lister les ouvrages empruntable
obtenir un ouvrage précis
@GregoireHebert
GregoireHebert / exercice.md
Created March 28, 2023 06:57
Exercice final GIT

Ajouter le depot distant

Dans un nouvelle branche A issue de main/master (nous incarnons une personne de la technique) créer un fichier README.md avec quelques lignes de contenu

<br />
<div align="center">
  <h3 align="center">Project</h3>