Introduction, concepts, features, other resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\ORM\Event\LifecycleEventArgs; | |
/** | |
* Trait CleanAssociationsTrait | |
* | |
* This trait is intended to fix the Doctrine ManyToOne relationships when the stored value in database is a 0 instead of NULL. | |
* Sometimes you plug Doctrine on an existing database without foreign key support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* Checks that all environment variables are set before deploying. | |
* | |
* @author Beno!t POLASZEK - 2018 | |
* @link https://gist.github.com/bpolaszek/559dbc341dec51303fc0dea8162cf735#gistcomment-2747882 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="d-inline-block d-sm-none">XS</div> | |
<div class="d-none d-sm-inline-block d-md-none">SM</div> | |
<div class="d-none d-md-inline-block d-lg-none">MD</div> | |
<div class="d-none d-lg-inline-block d-xl-none">LG</div> | |
<div class="d-none d-xl-inline-block">XL</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERCURE_URL=${MERCURE_URL:=https://github.com/dunglas/mercure/releases/download/v0.10.4/mercure_0.10.4_Linux_x86_64.tar.gz} | |
JWT_KEY=${JWT_KEY:=!ChangeMe!} | |
MERCURE_FILE=${MERCURE_URL##*/} | |
# Settings perms | |
echo "Creating mercure user..." | |
groupadd --system mercure | |
useradd --system \ | |
--gid mercure \ | |
--create-home \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# tests/bootstrap.php | |
declare(strict_types=1); | |
namespace App\Test; | |
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
use App\Entity\User; | |
use App\Kernel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="country" name="country"> | |
<option/> | |
</select> | |
<script> | |
(async () => { | |
const response = await fetch('https://restcountries.eu/rest/v2/all?fields=alpha2Code;name'); | |
const countries = await response.json(); | |
const select = document.getElementById('country'); | |
for (const country of countries) { | |
const option = document.createElement('option'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Tests; | |
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
use Symfony\Component\HttpClient\MockHttpClient; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
use Symfony\Contracts\HttpClient\ResponseInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Temporary breakpoint debugger --> | |
<span class="sm:hidden">XS</span> | |
<span class="hidden sm:inline md:hidden">SM</span> | |
<span class="hidden md:inline lg:hidden">MD</span> | |
<span class="hidden lg:inline xl:hidden">LG</span> | |
<span class="hidden xl:inline">XL</span> | |
<!-- / Temporary breakpoint debugger --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div v-if="show" class="absolute inset-0 h-screen w-screen bg-white bg-opacity-75 text-black z-500 flex items-center overflow-hidden"> | |
<div class="mx-auto text-5xl uppercase">{{ currentBreakpoint }}</div> | |
</div> | |
</template> | |
<script setup> | |
import { refAutoReset, useMediaQuery } from '@vueuse/core'; | |
import { computed, reactive, watch } from 'vue'; |
OlderNewer