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 ubuntu:latest | |
WORKDIR /tmp | |
RUN echo -e "Some binary data\nSome more binary data" > /tmp/my-binary-data-file | |
CMD cp /tmp/my-binary-data-file /home/dev/tmp && sleep infinity |
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.3' | |
volumes: | |
my_binary_data: | |
services: | |
my-app1: | |
build: | |
context: . | |
dockerfile: 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
<?php | |
namespace Core\InfrastructureBundle\Service\Firebase; | |
use Core\ApplicationBundle\Interfaces\PassengerDeviceNotificationSenderInterface; | |
use Google\Auth\Credentials\ServiceAccountCredentials; | |
use GuzzleHttp\Client as HttpClient; | |
use Psr\Http\Message\StreamInterface; | |
class MessageSend implements PassengerDeviceNotificationSenderInterface | |
{ |
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); | |
/** | |
* Сложение "столбиком" | |
*/ | |
function sum(string $a, string $b): string | |
{ | |
$args = func_get_args(); | |
foreach ($args as $key => $val) { | |
if ($val[0] === '0' || !preg_match('/^\d+$/', $val)) { |
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 Application\Migrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration; | |
use Doctrine\DBAL\Schema\Schema; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
/** |
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
# modified: wp-config.php | |
# modified: wp-content/plugins/akismet/_inc/akismet.css | |
# modified: wp-content/plugins/akismet/_inc/akismet.js | |
# modified: wp-content/plugins/akismet/_inc/img/logo-full-2x.png | |
# modified: wp-content/plugins/akismet/akismet.php | |
# modified: wp-content/plugins/akismet/class.akismet-admin.php | |
# modified: wp-content/plugins/akismet/class.akismet.php | |
# modified: wp-content/plugins/akismet/readme.txt | |
# modified: wp-content/plugins/akismet/views/config.php | |
# modified: wp-content/plugins/akismet/views/get.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 CoreDomain; | |
class Id | |
{ | |
private $value; | |
public function __construct($value) | |
{ |
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
public void WithdrawMoney(decimal amount) | |
{ | |
Atm atm = _repository.Get(); | |
_atmService.WithdrawMoney(atm, amount); | |
_repository.Save(_atm); | |
} | |
public sealed class AtmService // Domain service | |
{ | |
public void WithdrawMoney(Atm atm, decimal amount) |
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 DataObjects{ | |
/** |
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 News | |
{ | |
private $cache_section = 'news'; | |
private $dbctrl; | |
function __construct() | |
{ | |
$this->dbctrl = Base::initDB(); | |
} |
NewerOlder