Skip to content

Instantly share code, notes, and snippets.

View SevaShpun's full-sized avatar
🐍
Was ist das ?

SevaShpun SevaShpun

🐍
Was ist das ?
View GitHub Profile
[
{
"value": 1,
"first": "bar",
"second": "bar",
"third": "bar"
},
{
"value": 2,
"first": "grape",
###
# Telegram-казино
# Этот код позволяет понять, какие именно значения выпали в дайсе "казино" по тому, что вернул Bot API
# Авторы: @Groosha, @svinerus | 2020 год
###
from typing import List
# 0 1 2 3
casino = ["BAR", "виноград", "лимон", "семь"]
[
{
"value": 1,
"first": "bar",
"second": "bar",
"third": "bar"
},
{
"value": 2,
"first": "grape",
@MasterGroosha
MasterGroosha / whitelist.py
Created April 12, 2020 09:16 — forked from JrooTJunior/whitelist.py
Whitelist Middleware
from typing import Any, Dict, List, Set
from aiogram import types
from aiogram.dispatcher.handler import CancelHandler
from aiogram.dispatcher.middlewares import BaseMiddleware
from loguru import logger
class WhitelistMiddleware(BaseMiddleware):
def __init__(self, users: Set[int]):
@gabbhack
gabbhack / main.py
Created October 20, 2019 10:26
aiogram i18n example
from pathlib import Path
from typing import Tuple, Any
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.middlewares.i18n import I18nMiddleware
TOKEN = "TOKEN"
I18N_DOMAIN = "mybot"
BASE_DIR = Path(__file__).parent
@me7media
me7media / ajax Заблокирована загрузка смешанного активного содержимого
Created January 18, 2019 14:25
ajax Заблокирована загрузка смешанного активного содержимого
Если вы хотите разрешить запрос смешанного контента, добавьте тег ниже: <head> тег.
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Если вы хотите, чтобы заблокировать затем добавить тег ниже в <head> тег:
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
@atomjar
atomjar / product_style
Last active January 22, 2024 11:57
Stylesheet for Vue Mastery's Intro to Vue course
body {
font-family: tahoma;
color:#282828;
margin: 0px;
}
.nav-bar {
background: linear-gradient(-90deg, #84CF6A, #16C0B0);
height: 60px;
margin-bottom: 15px;
@xen
xen / check_hash.py
Last active May 3, 2024 21:19
telegram site auth
# 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(d, token):
secret = hashlib.sha256()
secret.update(token.encode('utf-8'))
@Demonslay335
Demonslay335 / globeimposter_config.py
Last active January 16, 2023 14:49
Extract GlobeImposter ransomware config
"""
Extract GlobeImposter 2.0 Ransomware Config
Author: @demonslay335
"""
import os
import sys
import binascii
import re
import hashlib