Skip to content

Instantly share code, notes, and snippets.

View ivdunin's full-sized avatar

Ilya D. ivdunin

View GitHub Profile
@ivdunin
ivdunin / canonical_path.py
Last active October 5, 2021 17:09
canonical_path
import sys
MAX_FILENAME_LENGTH = 255
MAX_FILEPATH_LENGTH = 4096
SEP = '/'
"""
Дана строка, которая является абсолютным путем к файлу или директории в системе Unix.
Нужно упростить эту строку до каноничного пути и написать автотесты для своей реализации. Использовать Python + pytest
"""
@ivdunin
ivdunin / Dockerfile
Last active October 18, 2020 05:00
Jenkins with Docker inside; Local docker registry and docker-compose for running jenkins
FROM jenkins/jenkins:lts
# We need this for correct mapping groups
ARG GID=999
USER root
ADD https://get.docker.com get-docker.sh
RUN sh get-docker.sh && \
usermod -a -G docker jenkins && \
apt-get clean && \
@ivdunin
ivdunin / locustfile.py
Created March 31, 2019 18:20 — forked from yamionp/locustfile.py
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent