Skip to content

Instantly share code, notes, and snippets.

View iamtalhaasghar's full-sized avatar
🇵🇰
Working From Home

Talha Asghar iamtalhaasghar

🇵🇰
Working From Home
View GitHub Profile
@iamtalhaasghar
iamtalhaasghar / matrix_server_notice.sh
Created February 25, 2024 09:30
Send server notice msg as an admin to any user in your synapse / matrix homeserver
# Prompts by https://gist.github.com/iamtalhaasghar
# Written by Chatgpt
# 25-Feb-2024
curl -X POST \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "@<target_user>:<server_domain>",
"content": {
@iamtalhaasghar
iamtalhaasghar / convert_mp4_mp3.py
Created May 11, 2024 11:47
A script to convert all .mp4 files in a dir to .mp3 audio files using ffmpeg.
#!/usr/bin/env python
import os
from glob import glob
import time
import logging
import sys
import shutil
import requests
from sha256sum import sha256sum