Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
<?php | |
declare(strict_types=1); | |
namespace App\Tests\Unit; | |
use PHPUnit\Framework\Constraint\Constraint; | |
class ConsecutiveCalls extends Constraint | |
{ |
<?php | |
namespace FavreBenjamin\Utils; | |
use Doctrine\Common\Persistence\ManagerRegistry; | |
use Doctrine\DBAL\Exception\RetryableException; | |
use Doctrine\ORM\EntityManagerInterface; | |
class CustomEntityManager |
<?php | |
declare(strict_types=1); | |
namespace App\Doctrine\Filter; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\AbstractContextAwareFilter; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface; | |
use Doctrine\ORM\QueryBuilder; | |
use Doctrine\Persistence\ManagerRegistry; |
<?php | |
/** | |
* This adds Permissions-Policy header to all Yii 2 app responses blocking FLoC. | |
* What is Federated Learning of Cohorts (FLoC)? - read https://web.dev/floc/ | |
* Google’s FLoC Is a Terrible Idea - read https://www.eff.org/pl/deeplinks/2021/03/googles-floc-terrible-idea | |
*/ | |
$config = [ | |
// ... other configuration | |
'components' => [ |
<?php | |
declare(strict_types=1); | |
namespace App\Entity; | |
use ApiPlatform\Core\Annotation\ApiFilter; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
use App\Doctrine\Filter\OrSearchFilter; |
<?php | |
/** | |
* Simple php cache using var_export generated files | |
* | |
* @author Marco Pivetta <[email protected]> | |
*/ | |
class Ocramius_PhpCache { | |
const DEFAULT_TTL = 3600; |
version: '3.7' | |
services: | |
reverse-proxy: | |
restart: always | |
networks: | |
- dev | |
container_name: traefik | |
image: traefik # The official Traefik docker image | |
command: --api --docker # Enables the web UI and tells Traefik to listen to docker | |
ports: |
let currentTime = Math.floor(Date.now() / 1000); | |
let tokenExpiration = pm.environment.get("token_expiration"); | |
if (tokenExpiration && tokenExpiration <= currentTime) { | |
let apiUrl = pm.environment.get("api_url"); | |
let refreshToken = pm.environment.get("refresh_token"); | |
if (refreshToken) { | |
pm.sendRequest( | |
{ | |
url: 'http://' + apiUrl + '/oauth/v2/token', | |
method: 'POST', |
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
<?php | |
function sortByDependency($input) | |
{ | |
$output = []; | |
$checkList = []; | |
$inputCount = count($input); | |
// while not all items are resolved: |