Skip to content

Instantly share code, notes, and snippets.

import { SessionProvider } from "next-auth/react"
export default function App({
Component,
pageProps: { session, ...pageProps },
}) {
return (
<SessionProvider session={session}>
<Component {...pageProps} />
</SessionProvider>
FORMAT: 1A
# Mon API de librairie
Pour tester, sauvegarder ce document dans un fichier library.apib
Installer l'outil de test `npm install -g drakov`
puis lancer la commande `drakov -f library.apib`
Testez votre API avec Insomnia.
# Ouvrages
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2019 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
@vincentchalamon
vincentchalamon / .gitlab-ci.yml
Created February 28, 2024 08:56
docker buildx bake on gitlab.com
variables:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_DRIVER: overlay2
.bake:
image: docker:latest
services:
- docker:dind
@vincentchalamon
vincentchalamon / CustomCalendarPeriod.php
Last active February 2, 2025 09:45
Polymorphism with API Platform
<?php
#[ApiResource(
operations: [
// no GetCollection operation
new Get(...),
new Post(...),
new Patch(...),
],
)]
<?php
declare(strict_types=1);
namespace App\OpenApi;
use ApiPlatform\Core\OpenApi\Factory\OpenApiFactory as ApiPlatformOpenApiFactory;
use ApiPlatform\Core\OpenApi\Factory\OpenApiFactoryInterface;
use ApiPlatform\Core\OpenApi\OpenApi;
use ApiPlatform\Core\OpenApi\Model;