Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| :) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192) | |
| CREATE TABLE test.nested | |
| ( | |
| EventDate Date, | |
| UserID UInt64, | |
| Attrs Nested( | |
| Key String, | |
| Value String) | |
| ) ENGINE = MergeTree(EventDate, UserID, 8192) |
| from telethon.tl.functions import InitConnectionRequest, InvokeWithLayerRequest | |
| from telethon.tl.functions import langpack # GetLangPackRequest, GetDifference | |
| from telethon.tl import all_tlobjects # for LAYER | |
| from telethon.tl.types import LangPackString, LangPackStringPluralized, LangPackStringDeleted | |
| from telethon.tl.functions import InitConnectionRequest, InvokeWithLayerRequest | |
| from telethon.tl.functions import langpack # GetLangPackRequest, GetDifference | |
| from telethon.tl import all_tlobjects | |
| from telethon.tl.types import LangPackString, LangPackStringPluralized, LangPackStringDeleted |
| vi /etc/environment | |
| add these lines... | |
| LANG=en_US.utf-8 | |
| LC_ALL=en_US.utf-8 |
| # implementation of Telegram site authorization checking algorithm | |
| # for more information https://core.telegram.org/widgets/login#checking-authorization | |
| import collections | |
| import hmac | |
| import hashlib | |
| def check_string(data, token): | |
| secret = hashlib.sha256() | |
| secret.update(token.encode('utf-8')) |
| FROM ubuntu | |
| RUN apt update \ | |
| && apt install -y firefox \ | |
| openssh-server \ | |
| xauth \ | |
| && mkdir /var/run/sshd \ | |
| && mkdir /root/.ssh \ | |
| && chmod 700 /root/.ssh \ | |
| && ssh-keygen -A \ | |
| && sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \ |
| from Crypto.Hash import SHA | |
| from Crypto.Signature import PKCS1_v1_5 | |
| from Crypto.PublicKey import RSA | |
| from base64 import urlsafe_b64encode | |
| from requests import get | |
| def get_version_signature(version, private_key): | |
| signed_data = b'TelegramBeta_%x'%int(version) |
| from itertools import product | |
| from typing import List, Tuple | |
| def __find_neighbours(x: int, y: int, size: int) -> List[Tuple]: | |
| """ | |
| Finds neighbours for a cell. Those which fall out of the field are skipped | |
| :param x: current cell's X coord | |
| :param y: current cell's Y coord | |
| :param size: field single dimension size (because field is square) |