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 Example; | |
use Throwable; | |
use OpenTelemetry\API\Instrumentation\CachedInstrumentation; | |
use OpenTelemetry\API\Trace\SpanInterface; | |
use OpenTelemetry\API\Trace\SpanKind; | |
use OpenTelemetry\API\Trace\StatusCode; | |
use OpenTelemetry\Context\Context; |
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); | |
use Rector\Core\Configuration\Option; | |
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; | |
use Rector\Php80\ValueObject\AnnotationToAttribute; | |
use Rector\Symfony\Set\SymfonySetList; | |
use OpenApi\Annotations as OA; | |
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | |
use Symfony\Component\Serializer\Annotation as Serializer; |
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 Chrisguitarguy\Example; | |
use OutOfBoundsException; | |
use Countable; | |
use IteratorAggregate; | |
use Psr\Log\AbstractLogger; | |
class CollectingLogger extends AbstractLogger implements Countable, IteratorAggregate |
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 bash | |
if [ "$#" != 1 ]; then | |
echo "Usage: $0 {migrationsDirectory}" >&2 | |
exit 1 | |
fi | |
find "$1" -type f -name '*.php' -exec sed -i '' 's/Doctrine\\DBAL\\Migrations\\AbstractMigration/Doctrine\\Migrations\\AbstractMigration/' {} \; | |
find "$1" -type f -name '*.php' -exec sed -i '' 's/function up(Schema \$schema)$/function up(Schema $schema) : void/' {} \; |
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 bash | |
if [ "$#" != 1 ]; then | |
echo "Usage: $0 {migrationsDirectory}" >&2 | |
exit 1 | |
fi | |
find "$1" -type f -name '*.php' -exec sed -i '' 's/Doctrine\\DBAL\\Migrations\\AbstractMigration/Doctrine\\Migrations\\AbstractMigration/' {} \; | |
find "$1" -type f -name '*.php' -exec sed -i '' 's/function up(Schema \$schema)$/function up(Schema $schema) : void/' {} \; | |
find "$1" -type f -name '*.php' -exec sed -i '' 's/function down(Schema \$schema)$/function down(Schema $schema) : void/' {} \; |
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 | |
class ClientDto | |
{ | |
public $id; | |
public $name; | |
public $site_url; | |
} | |
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 | |
class Token | |
{ | |
const T_OPEN_PAREN = 1; | |
const T_CLOSE_PAREN = 2; | |
const T_IF = 3; | |
const T_EQ = 4; | |
const T_PLUS = 5; |
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 | |
$key = getenv('AWS_SECRET_ACCESS_KEY'); | |
if (!$key) { | |
throw new \LogicException('Missing AWS_SECRET_ACCESS_KEY'); | |
} | |
$sig = hash_hmac('sha256', 'SendRawEmail', $key, true); | |
echo base64_encode(pack('C', 0x02) . $sig), PHP_EOL; |
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
http { | |
# other stuff here | |
# The upstream backend server this can be named whatever you desire | |
# See http://nginx.org/en/docs/http/ngx_http_upstream_module.html | |
upstream backend { | |
# this is the actual hostname + port of the backend server | |
server backend:8080; | |
# how many keep alive connections to allow, only set this if you're going | |
# to specify the `Connection` header in the proxy below, nginx sets the |
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 openjdk:9-jre AS build | |
## Deps to install DynamoDB | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
coreutils \ | |
ca-certificates \ | |
&& mkdir -p /dynamodb/data | |
WORKDIR /dynamodb |
NewerOlder