Skip to content

Instantly share code, notes, and snippets.

View mark99i's full-sized avatar
😀

Mark mark99i

😀
View GitHub Profile
# using curl -s https://gist.githubusercontent.com/mark99i/c2611df4a12ce1d048cd08fbc52f0002/raw/b8953281aece44d965ee244a3c42d7a28fe639dc/ubuntu-install-hyperv-addons.sh | bash
echo 'hv_vmbus' >> /etc/initramfs-tools/modules
echo 'hv_storvsc' >> /etc/initramfs-tools/modules
echo 'hv_blkvsc' >> /etc/initramfs-tools/modules
echo 'hv_netvsc' >> /etc/initramfs-tools/modules
apt update
apt -y install linux-virtual linux-cloud-tools-virtual linux-tools-virtual
update-initramfs -u
@mark99i
mark99i / Dockerfile
Created February 4, 2024 09:34
Dockerfile template for Python3 apps
FROM python:3.12
RUN mkdir /root/app
WORKDIR /root/app
ENV TZ Europe/Moscow
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN export PYTHONDONTWRITEBYTECODE=1
RUN export PYTHONUNBUFFERED=1
@mark99i
mark99i / Dockerfile
Created February 3, 2024 23:59
Building OpenSSL master with Python 3.12.1
FROM debian:sid as openssl
RUN apt update
RUN apt install git nano build-essential checkinstall zlib1g-dev -y
RUN mkdir /root/openssl
WORKDIR /root/openssl
RUN git clone git://git.openssl.org/openssl.git .
RUN ./config --prefix=/usr/local/custom-openssl --openssldir=/etc/ssl
RUN make -j1 depend
@mark99i
mark99i / blink_drive.sh
Created August 3, 2023 01:01
Simple script for generate start/stop blink drive command on LSI SAS3 HBA controllers
import os
folders: list[str] = os.listdir('./')
folders = list(filter(lambda fldr: not fldr.startswith('.') and os.path.isdir(fldr), folders))
for folder in folders:
files: list[str] = os.listdir(folder)
files = list(filter(lambda f: f.endswith('.bru'), files))
files = sorted(files)
@mark99i
mark99i / ezviz_api.py
Last active March 5, 2023 02:56
EZVIZ Cloud cameras (RU endpoints)
import base64
import json
import time
from hashlib import md5
from urllib.parse import urlencode
from requests import get, post, put, Response
import jwt
class BaseRequest:
success: bool
# aug/02/2020 20:44:33 by RouterOS 6.47.1
# software id = Х
#
# model = 751G-2HnD
# serial number = Х
/interface bridge
add name=LAN-vSw protocol-mode=none
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-onlyn channel-width=20/40mhz-XX \
country=russia disabled=no frequency=2432 installation=indoor mode=\
@mark99i
mark99i / gist:76951222f61b7f3c0396485e307b396e
Created November 17, 2019 23:42
working config kernel 5.3.5 (board orange pi one plus h6)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.3.5 Kernel Configuration
#
#
# Compiler: aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70400
upstream php-handler {
server 127.0.0.1:9000;
# server unix:/var/run/php/php7.3-fpm.sock;
}
#server {
# listen 80;
# listen [::]:80;
# server_name cloud.mydomain.ru;
# принудительное использование https