Skip to content

Instantly share code, notes, and snippets.

View Natanel-Shitrit's full-sized avatar
🇮🇱

Natanel Shitrit Natanel-Shitrit

🇮🇱
  • Israel
View GitHub Profile
@Natanel-Shitrit
Natanel-Shitrit / schedule_wa_messages.md
Created November 25, 2023 02:19
Schedule WhatsApp Messages (w/ Termux, Tasker-MdtestV5, crontab)

Background

The reason I made this is really stupid - basically I send alerts of various things to myself via WhatsApp Cloud API.
But in order to send messages via this API (for some stupid reason), the user must initiate the conversation. (and each conversation is 24 hours)

I'm too lazy to send a message every 24 hours to the bot - so let's automate this!

drawing
@Natanel-Shitrit
Natanel-Shitrit / fastresume-migrate.py
Created October 13, 2023 21:16
qBittorrent FastResume Migration Script
import argparse
import os
import pprint
import shutil
from typing import Dict, List, Optional
import bencodepy
BENCODE_TYPE = bytes | List['BENCODE_TYPE']
@Natanel-Shitrit
Natanel-Shitrit / telegram_groups_channels.py
Created November 26, 2022 23:34
Find all common users in multiple channels
import argparse
from typing import List, Tuple
from telethon import functions, types
from telethon.sync import TelegramClient
from telethon.tl.functions.channels import GetParticipantsRequest
def find_users_in_all_groups(telethon_args: Tuple[str, str, str], channels: List[str]):
common_users = set()