Skip to content

Instantly share code, notes, and snippets.

View v1-wizard's full-sized avatar
🏠
Working from home

Aliaksei Boole v1-wizard

🏠
Working from home
View GitHub Profile
FROM python:3-alpine3.8
LABEL maintainer="aliaksei.boole@rozum.com"
RUN apk add make git openssh build-base netcat-openbsd openjdk8-jre tar wget
RUN wget -c https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.tgz -O - | \
tar -xz && chmod +x /allure-2.7.0/bin/allure
ENV PATH "$PATH:/allure-2.7.0/bin"
@v1-wizard
v1-wizard / gist:47a17c642c96c7f999734fff53b8a88c
Created April 30, 2019 15:25
Python in functional style
while True:
new_slots = get_new_slots()
new_slots = map(update_firmware, new_slots)
avail_slots.append(new_slots)
avail_slots = map(exec_test_encoders, avail_slots)
avail_slots = map(test_temperature, avail_slots)
avail_slots = map(calibrate_cogging, avail_slots)
avail_slots = map(test_rotation_uniformity, avail_slots)
avail_slots = map(generate_report, avail_slots)
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},uid=1000,gid=1000"