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.4' | |
services: | |
miniflux: | |
image: miniflux/miniflux:latest | |
ports: | |
- "80:8080" | |
depends_on: | |
- db | |
environment: | |
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable |
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 | |
// @see: https://github.com/sebastianbergmann/phpunit/issues/4026 | |
// Use `$this->with(...$this->consecutiveParams($args1, $args2))` instead of `$this->withConsecutive($args1, $args2)`. | |
use PHPUnit\Framework\TestCase; | |
class FooTest extends TestCase | |
{ | |
use ConsecutiveParams; |
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 php:8.1-fpm-alpine | |
ARG TIDEWAYS_EXTENSION_VERSION=5.5.12 | |
ARG TIDEWAYS_PHP_VERSION=8.0 | |
ARG TIDEWAYS_PHP_EXTVER=20200930 | |
RUN wget "https://tideways.s3-eu-west-1.amazonaws.com/extension/${TIDEWAYS_EXTENSION_VERSION}/tideways-php-${TIDEWAYS_EXTENSION_VERSION}-alpine-arm64.tar.gz" && \ | |
tar xvzf tideways-php-${TIDEWAYS_EXTENSION_VERSION}-alpine-arm64.tar.gz && \ | |
cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so /usr/local/lib/php/extensions/no-debug-non-zts-${TIDEWAYS_PHP_EXTVER}/tideways.so && \ | |
rm -rf tideways-php-${TIDEWAYS_EXTENSION_VERSION}-alpine-arm64.tar.gz ./build |
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\Providers; | |
use App\YourCustomOutputStyle; | |
use Illuminate\Console\OutputStyle; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ |
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
// Resources | |
// @see: https://www.technipages.com/how-to-auto-refresh-chrome-tabs-without-an-extension | |
// @see: https://stackoverflow.com/questions/1217929/how-to-automatically-reload-a-web-page-at-a-certain-time | |
// Paste this into the Web Inspector on the browser tab you want to refresh and hit Enter. | |
// Change this to the exact time you want to refresh the page at: | |
let then = new Date('2022-12-09 01:01:00'); | |
window.setTimeout(() => window.location.reload(true), then.getTime() - new Date().getTime()); |
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
-- DB Fiddle: https://www.db-fiddle.com/f/3TSbU9ZnpSMkCRgnWYeBep/1 | |
-- Create a customers table with an array JSON column containing their favourite numbers. | |
create table `customers` ( | |
`id` bigint unsigned auto_increment, | |
`name` varchar(222), | |
`numbers` json not null, | |
primary key (`id`), | |
key `customers_numbers_index` ((cast(json_extract(`numbers`,_utf8mb4'$[*]') as unsigned array))) | |
) engine=InnoDB default charset=utf8mb4 collate=utf8mb4_unicode_ci; |
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 | |
// The X-Amz-Server-Side-Encryption header must be set in formInputs and options, with the correct case. | |
new PostObjectV4( | |
$client, | |
$bucket, | |
[ | |
'key' => $key, | |
'acl' => 'private', | |
'X-Amz-Server-Side-Encryption' => 'AES256', | |
], |
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 | |
docker run -ti --rm -v $PWD:/mnt dkhamsing/awesome_bot --allow-dupe --white-list igor.io,symfony,toranproxy.com,vagrantup.com,3v4l.org,voicesoftheelephpant.com,drupal.org,oreilly.com README.md |
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 | |
use Illuminate\Foundation\Application; | |
use Illuminate\Http\Request as LaravelRequest; | |
use Illuminate\Http\Response as LaravelResponse; | |
use Slim\Factory\ServerRequestCreatorFactory; | |
use Slim\Http\Response as SlimResponse; | |
use Slim\Http\ServerRequest as SlimServerRequest; | |
class LaravelToSlimController | |
{ |
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 Tests\Feature; | |
use Tests\RefreshesDatabase; | |
class ExampleTest | |
{ | |
use RefreshesDatabase; | |
public string $connectionToMigrate = 'mysql-elevated'; |