Skip to content

Instantly share code, notes, and snippets.

@AlexMAS
AlexMAS / adr-review-conditions.en.md
Created November 19, 2026 12:10
Фрагмент ADR: Условия пересмотра

ADR: SOAP as the Standard for Synchronous Communication

Hypothetical example of an architectural decision made in 2011.

Context

We are building an integrated healthcare information system consisting of multiple independent products. Each product may be developed by a separate team or an external contractor using its own technology stack.

We need a common communication mechanism that does not depend on programming languages, platforms, or individual developers' preferences. We cannot standardize the technologies used by every participant, but we can standardize the contracts between them.

@AlexMAS
AlexMAS / checklist.md
Created May 11, 2026 12:25
Чеклист по приёмке проекта

Чеклист по приёмке проекта

Ниже перечислены основные аспекты, на которые стоит обратить внимание при приёмке проекта. Список не является исчерпывающим, не задаёт жёсткий порядок исполнения, а каждый из его пунктов не является обязательным.

Приведённый список может быть использован как основа для создания дорожной карты.

Основные ресурсы (инвентаризация ресурсов)

  • База знаний (wiki, Confluence и т.п.)
  • Трекер задач (Jira и т.п.)
@AlexMAS
AlexMAS / chronicle-queue-settings.md
Last active May 5, 2026 11:56
Chronicle Queue settings for Java 17+
@AlexMAS
AlexMAS / ubiquitous-language-dictionary-prompt.md
Created April 2, 2026 04:56
🤖 Prompt to generate "Ubiquitous Language Dictionary" based on the codebase

По имеющейся кодовой базе сформируй словарь предметной области и сохрани его в terms.md.

Словарь должен иметь три колонки:

  • Термин.
  • Синонимы.
  • Определение.

Термин - это слово или словосочетание на русском или английском языке, аббревиатура на русском или английском языке, которая имеет однозначный смысл в терминологии предметной области.

@AlexMAS
AlexMAS / SnowflakeID.java
Created July 23, 2025 09:55
How to create a unique integer sequence in a distributed system by using the Snowflake ID.
import java.time.Instant;
import static java.lang.System.currentTimeMillis;
public class SnowflakeID {
private static final byte DATACENTER_ID_BITS = 5;
private static final byte MACHINE_ID_BITS = 5;
private static final byte SEQUENCE_BITS = 12;
@AlexMAS
AlexMAS / CassandraSequenceGenerator.java
Last active March 25, 2025 06:13
How to create a unique integer sequence in Apache Cassandra by using the Lamport Timestamps.
package ru.mos.emias.simi.cdc.repositories;
import java.util.UUID;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.cql.PreparedStatement;
import static com.datastax.oss.driver.api.querybuilder.QueryBuilder.*;
import static com.datastax.oss.driver.api.querybuilder.condition.Condition.column;
@AlexMAS
AlexMAS / ProcessAsyncHelper.cs
Last active August 30, 2025 20:40
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
@AlexMAS
AlexMAS / ProcessHelper.cs
Last active October 10, 2024 21:05
The right way to run external process in .NET
public static class ProcessHelper
{
public static ProcessResult ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
using (var process = new Process())
{
process.StartInfo.FileName = command;
process.StartInfo.Arguments = arguments;
@AlexMAS
AlexMAS / ContentDisposition.cs
Created March 12, 2016 12:51
Set Content-Disposition with encoded filename
public static void SetContentDispositionInline(this HttpResponse response, string fileName, string userAgent)
{
SetContentDisposition(response, "inline", fileName, userAgent);
}
public static void SetContentDispositionAttachment(this HttpResponse response, string fileName, string userAgent)
{
SetContentDisposition(response, "attachment", fileName, userAgent);
}