Skip to content

Instantly share code, notes, and snippets.

@morozow
morozow / comments.md
Created June 23, 2021 17:09
Development comments management

Development comments management

  • IDE
    • The list of development comments
      • @cons: consider
      • @tech: technical
      • @todo: improve
      • @note: information
      • @important: note/remember/consider/etc. the important part of the code
      • @req[XX]: request the information from a colleague "XName XSurname"
  • Tune the JetBrains IDE:
@morozow
morozow / docs.docker-compose.yml
Created September 21, 2019 16:22
Separate server Docker Compose docs file to run documentation
version: "3"
services:
nginx-docs:
container_name: "docs.nginx"
ports:
- "7837:80"
@morozow
morozow / docker-compose.yml
Last active September 23, 2019 19:40
Separate server Docker Compose base file to run documentation
version: "3"
services:
nginx-docs:
image: "nginx"
container_name: "nginx"
volumes:
- ./.docs/html:/usr/share/nginx/html:ro
ports:
- "80:80"
environment:
@morozow
morozow / versionings.md
Last active December 25, 2018 15:25
Инструмент автоматизации управления версиями

Инструмент автоматизации управления версиями

Версионирование

Версионирование — разработка и управление несколькими выпусками продукта, которые имеют тот же общий функционал, но усовершенствованы, модернизированы либо индивидуализированы. Коротко, версия говорит об изменении продукта. Как версия говорит об изменении продукта? Давайте назовем систему упорядочивания символов для обозначения версии продукта — схемой версионирования. Различные схемы версионирования были созданы для отслеживания версий различного программного обеспечения.

Semantic Versioning: Major.Minor.Patch

Схем версионирования много, но мы сталкиваемся с Семантическим версионированием (Semantic Versioning) каждый день. Для Семантического версионирования характерно то, что номера версий и то, как они меняются, передают смысл содержания исходного кода и какие модификации были применены от одной версии к другой. Рассмотрим, каким образом формируется номер Семантической версии.

Patch version, обратно совместимые исправления: n.n.X

<?php
namespace ApiBundle\Features\Context;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Guzzle\Http\Client;
use Guzzle\Http\Exception\BadResponseException;
@morozow
morozow / README.md
Last active September 28, 2015 20:41 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :

@morozow
morozow / getAncestorsByTree.php
Last active August 29, 2015 14:16
This recurcive function build full path for nested set node by classic array
<?php
/**
* This recurcive function build full path for nested set node by classic array
*
* @param $tree
* @param $needle
* @param array $path
* @return array|bool
*/