This file contains hidden or 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
module AggregateService | |
def self.aggregate(collection, &block) | |
agg = Aggregate.new(collection, &block) | |
agg | |
end | |
module AggregateStages | |
def match(&block) | |
@stages << { | |
'$match' => Match.new(&block).formatted |
This file contains hidden or 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: '2' | |
services: | |
zabbix_db: | |
image: mysql/mysql-server:latest | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
ports: | |
- 3306:3306 | |
environment: | |
MYSQL_ROOT_PASSWORD: supersecure |
This file contains hidden or 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 MyProject\Behaviours; | |
trait Settings { | |
protected $settings; | |
public function loadSettings (array $settingsArray = array()) { | |
$this->settings = $settingsArray; | |
} |
This file contains hidden or 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 BetterDateTime extends DateTime { | |
private $dictFormatToStrf = array ( | |
"d" => "%d", | |
"D" => "%a", | |
"j" => "_nt-dm_", //%e | |
"l" => "%A", | |
"N" => "%u", | |
"S" => "_suffix_", |