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 | |
function fib_match(int $i): int | |
{ | |
return match($i) { | |
1,2 => 1, | |
default => fib_match($i - 1) + fib_match($i - 2), | |
}; | |
} |
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 | |
use Koriym\Spaceman\Convert; | |
require __DIR__ . '/vendor/autoload.php'; | |
if ($argc < 3) { | |
echo "Usage: spaceman NAMESPACE DIR", PHP_EOL; | |
exit(1); |
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' | |
services: | |
nginx: | |
image: shin1x1/laravel-nginx118 | |
ports: | |
- '8000:80' | |
volumes: | |
- .:/var/www/html | |
depends_on: | |
- 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
package variant | |
import ( | |
"bufio" | |
"fmt" | |
"github.com/pkg/errors" | |
log "github.com/sirupsen/logrus" | |
"os" | |
"os/exec" | |
"strings" |
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 Acme\Application\Action; | |
use Acme\Application\Repository\UserPaginatorRepository; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Pagination\Paginator; | |
final class UserListAction | |
{ |
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 Acme\Infrastructure\Repository; | |
use Acme\Domain\Exception\NotFoundException; | |
use Acme\Domain\Model\PointEmail; | |
use Acme\Domain\Model\UserId; | |
use Acme\Domain\Repository\PointEmailRepository; | |
use Acme\Infrastructure\Eloquent\EloquentUser; |
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 Acme\Domain\Repository; | |
use Acme\Domain\Model\PointEmail; | |
use Acme\Domain\Model\UserId; | |
interface PointEmailRepository | |
{ | |
/** |
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 Acme\Infrastructure\Repository; | |
use Acme\Domain\Exception\NotFoundException; | |
use Acme\Domain\Model\User; | |
use Acme\Domain\Model\UserId; | |
use Acme\Domain\Repository\UserRepository; | |
use Acme\Infrastructure\Eloquent\EloquentUser; |
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 Acme\Domain\Repository; | |
use Acme\Domain\Model\User; | |
use Acme\Domain\Model\UserId; | |
interface UserRepository | |
{ | |
/** |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"sync" | |
"time" | |
) |