Skip to content

Instantly share code, notes, and snippets.

View repen's full-sized avatar
:octocat:

Andrey Plugin repen

:octocat:
View GitHub Profile
#include <stdio.h>
#define MESSAGE_QUANTITY 10;
struct LEDMessage{
unsigned char led_code;
unsigned char value;
unsigned int hash_sum;
};
#include <stdio.h>
#define MESSAGE_QUANTITY 10;
struct LEDMessage{
char led_code;
char value;
unsigned int hash_sum;
};
docker ps -a --format "table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}"
docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}"
@repen
repen / gist:17d2b820e2b77d3e1cacf7b0d22be3a7
Created September 17, 2021 07:37
Правила чата Sport Api
Правила чата https://t.me/sport_api | Sport Api
1. Условия действия правил чата
1.1 Пользователи, заходя в чат, принимают на себя добровольные обязательства беспрекословно соблюдать нижеперечисленные правила.
1.2 Незнание правил не освобождает от ответственности за их нарушения, убедительно рекомендуем с ними ознакомиться.
2. В чате разрешается
2.1 Общаться, общаться и ещё раз общаться, а также совершать любые другие действия не нарушающие п3.
@repen
repen / gist:7e2c93d0e71d32e4c02b953cea06804d
Created August 22, 2021 19:18 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
import re
# 1 Пароль: только латиница, наличие строчной и заглавной буквы, цифры и минимум 12 символов
re.compile(r"^(?=.*[A-z0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{12,}$")
# 2 Номер телефона КЗ формата
re.compile(r"^\+?(?:7|8)\s?\(?(?:7|6)\d{2}\)?\s?\d{3}\s?\d{2}\s?\d{2}$")
# -*- coding: utf-8 -*-
import socket
import os
print("Connecting...")
if os.path.exists("/tmp/python_unix_sockets_example"):
client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
client.connect("/tmp/python_unix_sockets_example")
print("Ready.")
print("Ctrl-C to quit.")
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
.idea
# Distribution / packaging
.Python
*.py[cod]
*$py.class
# C extensions
*.so
__pycache__/
.idea
.env
.venv
env/
import configparser, time, re, os
from tools import log as lo, listdir_fullpath
class Text:
def __init__(self, text, path):
self.text = text
self.path = path
def __del__(self):