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
FROM php:5.6 | |
# Update stretch repositories for old packages: https://stackoverflow.com/a/76095392 | |
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \ | |
-e 's|security.debian.org|archive.debian.org/|g' \ | |
-e '/stretch-updates/d' /etc/apt/sources.list | |
# Some libs | |
RUN apt-get update --fix-missing && apt-get install -y vim curl locales apt-utils git qrencode imagemagick memcached zip unzip |
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
twitter.com##div[data-testid="cellInnerDiv"]:has(h2):has-text(Découvrez plus) ~ * | |
twitter.com##div[data-testid="cellInnerDiv"]:has(h2):has-text(Découvrez plus) |
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
// 1. First route: Get data and index them in Postman Variable | |
// Set this content in Request > "Tests" Tab | |
// Step: You can get barcode with Sale > Get by ID | |
var jsonData = JSON.parse(responseBody); | |
if (jsonData.data.idSale) { | |
postman.setEnvironmentVariable("saleId", jsonData.data.idSale); | |
} |
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 | |
$query = <<<'GRAPHQL' | |
query GetUser($user: String!) { | |
user (login: $user) { | |
name | |
repositoriesContributedTo { | |
totalCount | |
} |
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 | |
const TEST_KEY = 'are_we_glued'; | |
const REDIS_HOST = 'localhost'; | |
const REDIS_PORT = 6379; | |
$redis = new Redis; | |
try { | |
$redis->connect(REDIS_HOST, REDIS_PORT); | |
$redis->set(TEST_KEY, 'yes'); | |
$glueStatus = $redis->get(TEST_KEY); |
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 Symfony\Component\HttpClient\HttpClient; | |
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; | |
// Complete configuration: https://hcaptcha.com | |
const HCAPTCHA_SECRET_KEY = '...'; | |
const HCAPTCHA_API_KEY = '...'; | |
/** | |
* @throws Exception |
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 | |
// src/DataFixtures/AppFixtures.php | |
namespace App\DataFixtures; | |
use App\DataFixtures\ORM\AppNativeLoader; | |
use Doctrine\Bundle\FixturesBundle\Fixture; | |
use Doctrine\Persistence\ObjectManager; | |
class AppFixtures extends Fixture | |
{ |
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
# config/packages/fos_rest.yaml | |
# Documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/ | |
fos_rest: | |
routing_loader: false | |
view: | |
view_response_listener: 'force' | |
formats: | |
json: true | |
xml: true | |
zone: |
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 | |
// src/Controller/Api/CinemaController.php | |
namespace App\Controller\Api; | |
use App\Collection\CinemaCollection; | |
use FOS\RestBundle\Controller\{AbstractFOSRestController, Annotations as Rest}; | |
use FOS\RestBundle\View\View; | |
use Nelmio\ApiDocBundle\Annotation\{Model, Security}; | |
use OpenApi\Annotations as OA; |
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 | |
namespace App\Controller\Api; | |
use App\Collection\CinemaCollection; | |
use FOS\RestBundle\Controller\{AbstractFOSRestController, Annotations as Rest}; | |
use FOS\RestBundle\View\View; | |
use Nelmio\ApiDocBundle\Annotation\{Model, Security}; | |
use OpenApi\Annotations as OA; | |
use Symfony\Component\HttpFoundation\Request; |
NewerOlder