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 / kb-layout.vil
Created March 17, 2024 09:48
piantor layout
{
"version": 1,
"uid": 1113869408211332572,
"layout": [
[
["KC_NO", "KC_Y", "KC_C", "KC_L", "KC_M", "KC_K"],
["KC_NO", "KC_I", "KC_S", "MT(MOD_LALT,KC_R)", "MT(MOD_LGUI,KC_T)", "KC_G"],
["KC_NO", "KC_Q", "KC_V", "KC_W", "KC_D", "KC_J"],
["LGUI(LCTL(KC_Q))", "MT(MOD_MEH,KC_SPACE)", "OSM(MOD_LSFT)", -1, -1, -1],
@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>
// https://pastebin.com/kVeMjwjx
# endpoints publics
renouvellement de mot de passe
connexion
lister les ouvrages empruntable
obtenir un ouvrage précis
@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;
/**
@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 / 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>
@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

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 / .gitconfig
Last active April 10, 2020 07:59
Custom ~/.gitconfig
[user]
name = Grégoire Hébert
email = gregoire@les-tilleuls.coop
[core]
excludesfile = /Users/gheb/.gitignore_global
[difftool]
prompt = false
[color]
branch = auto
status = auto
@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;
}