Skip to content

Instantly share code, notes, and snippets.

@Tishka17
Tishka17 / hhash.py
Last active December 13, 2024 09:31
Comparing hash calculation
import hashlib
from timeit import timeit
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
a = b'1 2 3 4' * 1024 * 1024 * 100
funcs = [
hashlib.sha1,
hashlib.sha256,
hashlib.sha384,
@zapisnicar
zapisnicar / telegram_bot.md
Last active October 15, 2025 09:00
How to create Telegram bot and send messages to group

How to create Telegram Bot and send messages to your group

  1. Create Telegram bot:

    Search for user @BotFather in Telegram app. Type /help in BotFather chat and wait for the reply. Type in the chat:

    /newbot

or select /newbot command from Help text. Answer few setup questions:

@zmts
zmts / tokens.md
Last active October 29, 2025 08:59
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов