Skip to content

Instantly share code, notes, and snippets.

View maksimuimin's full-sized avatar

Maksim Uimin maksimuimin

  • VK
  • Saint Petersburg, Russia
View GitHub Profile
#include <fcntl.h>
#include <iostream>
#include <stdio.h>
#include <unistd.h>
int main() {
int my_file = open("/dev/null", 0);
if (my_file == -1)
perror("open");
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <iostream>
#include <atomic>
#include <vector>
#define ms 1000
@maksimuimin
maksimuimin / channels_showcase.go
Created June 20, 2025 15:40
Каналы в go
// You can edit this code!
// Click here and start typing.
package main
import (
"context"
"fmt"
"sync"
"time"
)
local function measure(func, ...)
local timer = require('mqdx-utils.timer'):new()
fiber.top_enable()
local old_fib_info = fiber.self():info()
local old_metrics = misc.getmetrics()
timer:start()
local res = {func(...)}
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
static jmp_buf buf;
void handler(int sig) {
printf("Got signal: %s\n", strsignal(sig));
@maksimuimin
maksimuimin / homework.md
Created February 7, 2023 09:39
Тестовое задание для собеседования на позицию младшего Backend-разработчика

Задание

Надо написать iproto-сервер, который будет осуществлять операции над некоторым стораджем.

При написании можно использовать языки C и Go. Сервер должен работать под ОС Linux. Помимо стандартной библиотеки языка можно (но не обязательно) использовать следующие библиотеки:

C Go
pthread https://github.com/vmihailenco/msgpack
https://github.com/enki/libev https://github.com/prometheus/client_golang/
https://github.com/tarantool/small