Skip to content

Instantly share code, notes, and snippets.

@MasterAler
MasterAler / highload.md
Created December 29, 2023 16:24 — forked from pavlov200912/highload.md
Конспект Проектирование Высоконагруженных систем 2021

package main

/* Билеты по Проектированию Высоко нагруженных систем

  • В этом конспекте нет автоматической грамматической проверки
  • Он написан для личного пользования, исключительно для подготовки к экзамену
@MasterAler
MasterAler / rtsp-simple-server.yml
Last active December 7, 2023 21:50
Minimal recipe for rtsp-simple-server
###############################################
# General parameters
# Sets the verbosity of the program; available values are "error", "warn", "info", "debug".
logLevel: debug
# Destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]
# If "file" is in logDestinations, this is the file which will receive the logs.
logFile: rtsp-simple-server.log

Keybase proof

I hereby claim:

  • I am masteraler on github.
  • I am masteraler (https://keybase.io/masteraler) on keybase.
  • I have a public key whose fingerprint is 130C D3C9 30C1 C4E2 CD4F 9691 7AD0 340C 360F 6AD4

To claim this, I am signing this object:

@MasterAler
MasterAler / serialization.hpp
Last active February 28, 2022 22:22
simple custom serialization example
#pragma once
#include <iostream>
#include <string>
#include <list>
#include <iterator>
#include <type_traits>
#include <algorithm>
/* This is a small & simple example
@MasterAler
MasterAler / grafana_datasource_prometheus.yml
Created February 16, 2022 15:28
Prometheus quick-start with Grafana
apiVersion: 1
datasources:
- name: prometheus
type: prometheus
access: proxy
url: http://127.0.0.1:9090/
version: 1
isDefault: true
jsonData:
timeInterval: '30s'
@MasterAler
MasterAler / kafka_listener.py
Last active February 2, 2022 14:21
Simple aiokafka listener with consumer & producer
import asyncio
import logging
import ecs_logging
import sys
import json
from dataclasses import dataclass
from typing import Callable
from aiokafka import AIOKafkaConsumer, AIOKafkaProducer
from aiokafka.helpers import create_ssl_context
from .config import BOOTSTRAP_SERVERS # <--- that is supposed to be some valid connection string
@MasterAler
MasterAler / unmarshal.defaults.go
Last active December 22, 2021 17:06 — forked from dwburke/unmarshal.defaults.go
Default values when unmarshalling JSON and YAML in Go
package main
import (
"encoding/json"
"fmt"
"os"
yaml "gopkg.in/yaml.v2"
)
@MasterAler
MasterAler / remuxer.cc
Last active July 15, 2021 19:40
Remuxing arbitrary video stream into MKV via FFMPEG
#include <atomic>
#include <condition_variable>
#include <deque>
#include <functional>
#include <iostream>
#include <memory>
#include <mutex>
#include <thread>
extern "C" {
@MasterAler
MasterAler / socket_quiz.cpp
Last active February 19, 2020 22:32
Небольшая задачка на сокеты
#include <sys/socket.h>
#include <sys/un.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
/*! Код без проверок, он примерный, он не важен!!!
*/
int create_socket()
@MasterAler
MasterAler / Internship.md
Last active December 12, 2019 11:45
Тестовое задание для стажировки в Kraftway

Тестовое задание

Приветствую тебя, читающий это. Если ты юн, неопытен и желаешь приобщиться к разработке на C++ в славном Kraftway, то ниже описано небольшое испытание, которое следует пройти, чтобы доказать свою преданность Тёмным Искусствам способность с этим самым C++ обращаться. Они несложные.

Тут две части: вопросы, на которые надо дать ответ (в виде кода) и небольшое практическое задание, максимально приближенное к тому, что программисты делают в повседневной работе.

Дисклеймер: наличие целого ряда заданий вовсе не означает, что необходимо выполнить идеально их все до единого, надо просто быть лучше остальных претендентов =)

Как оформить решение