View rector.php
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; |
View CollectingLogger.php
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 |
View upgrade_migrations.sh
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/' {} \; |
View upgrade_migrations
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/' {} \; |
View client_dto_1.php
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; | |
} | |
View parser.php
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; |
View generate_aws_ses_password.php
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; |
View nginx.conf
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 |
View Dockerfile
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 |
View all_account_policy.json
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowS3", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::{REDSHIFT_ACCOUNT_ID}:root" | |
}, | |
"Action": [ |
NewerOlder