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\GraphQL\Queries; | |
use App\GraphQL\SchemaPrinter; | |
use GraphQL\Type\Definition\ResolveInfo; | |
use Nuwave\Lighthouse\GraphQL; | |
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext; | |
/** |
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\Graphql\Directives; | |
use Nuwave\Lighthouse\Schema\Directives\BaseDirective; | |
use Nuwave\Lighthouse\Support\Contracts\DefinedDirective; | |
/** | |
* Class KeyDirective | |
* |
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\Graphql\Directives; | |
use Nuwave\Lighthouse\Schema\Directives\FieldDirective; | |
class KeyDirective extends FieldDirective | |
{ | |
public function name(): string | |
{ |
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 SchemaPrinter { | |
/** | |
* @param Schema $schema | |
* @param array $options | |
* | |
* @return string | |
*/ | |
public static function printFederatedSchema(Schema $schema, array $options = []): string | |
{ |
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: '3.2' | |
services: | |
jenkins: | |
build: ./jenkins | |
container_name: jenkins | |
ports: | |
- "50000:50000" | |
expose: | |
- 8080 | |
restart: always |
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 | |
protected function attemptLogin(Request $request) | |
{ | |
$guards = array_keys(config('auth.guards')); | |
$attempts = []; | |
foreach ($guards as $guard) { | |
$guardInstance = Auth::guard($guard); |
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
function foo(?string $val) | |
{ | |
echo (string) $val; | |
} | |
foo('test') | |
foo(true) | |
foo(false) | |
foo(null) |
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 | |
// PHP 7.2.10 | |
$value = "test"; | |
var_dump( | |
$value, | |
in_array($value, [1]), | |
in_array($value, [true]), | |
in_array($value, ['true']), |
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
auth: | |
build: | |
context: ./docker/auth | |
dockerfile: Dockerfile${DOCKERFILE_POSTFIX} | |
expose: | |
- 9000 | |
environment: | |
- SERVICE_NAME=auth | |
labels: | |
- "traefik.enable=true" |
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
#!/bin/bash | |
# Usage example: | |
# /usr/local/bin/ffmpeg -i test.mp4 -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -preset slow -f mp4 -s 640x480 test-out.mp4 | |
mkdir -p ~/ffmpeg_sources ~/bin | |
rm -rf ~/ffmpeg_build ~/bin/{ffmpeg,ffprobe,ffplay,ffserver,x264,x265 | |
apt-get update -qq && apt-get -y install \ | |
autoconf \ |