Skip to content

Instantly share code, notes, and snippets.

View Zayon's full-sized avatar

Pablo Godinez Zayon

  • Evaneos
  • Lyon, France
View GitHub Profile
@Zayon
Zayon / FixtureContext.php
Created June 27, 2019 15:35
fixtures-blogpost protect databases
<?php
/** @var Connection[] $connections */
$connections = $doctrine->getConnections();
foreach ($connections as $connection) {
if ('pdo_sqlite' !== $connection->getDriver()->getName()) {
throw new \RuntimeException('Meaningful message here');
}
}
@Zayon
Zayon / add-products.feature
Created June 27, 2019 15:37
Introducing SharingContext
Given I store the "id" property of "category_tools" as "category_tools_id"
When I send a "POST" request to "/products/" with body:
"""
{
"name": "Super cool drill",
"price": 249.99,
"category": category_tools_id
}
"""
@Zayon
Zayon / add-products.feature
Created June 27, 2019 15:38
Introducing SharingContext 2
When I send a "POST" request to "/products/" with body:
"""
{
"name": "Super cool drill",
"price": 249.99,
"category": {{ category_tools.id }}
}
"""
@Zayon
Zayon / FeatureContext.php
Last active June 27, 2019 15:39
SharingContext ArrayAccess demo
<?php
$this->sharingContext['key'] = $value; // set a value
$value = $this->sharingContext['key']; // retrieve value
@Zayon
Zayon / bundles.php
Created June 27, 2019 16:25
Enable bundles
<?php
return [
// ...
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], // should already be enabled.
// ..
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['test' => true],
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['test' => true],
];

Arch installation

Disk Partitionning

fdisk -l or lsblk to identify disks

Determine the main disk where /boot partition will reside. We need two partitions: the one for /boot and the other for LVM group.

Open partitioning tool fdisk /dev/sda

@Zayon
Zayon / README.md
Last active November 18, 2020 10:09
Xdebug x Docker

Xdebug with Docker

With docker dev image

Dockerfile

FROM production as dev

USER root