Skip to content

Instantly share code, notes, and snippets.

View Malith-Rukshan's full-sized avatar
:octocat:
Keep learning ツ

Malith Rukshan Malith-Rukshan

:octocat:
Keep learning ツ
View GitHub Profile
@Malith-Rukshan
Malith-Rukshan / Fix_GHCR_IPv6_Connection_Reset.md
Created December 11, 2025 05:56
Fix for ghcr.io read: connection reset by peer ipv6 error ✅

⚡ Quick Fix: GHCR IPv6 Connection Reset

If you see ghcr.io read: connection reset by peer ipv6 when pulling from GitHub Container Registry, your system might be failing on IPv6.

The fix is to force IPv4 by editing your local hosts file.

📝 The Fix

  1. Locate your hosts file:
@Malith-Rukshan
Malith-Rukshan / validateInitData.py
Last active October 10, 2025 06:05
Validate Init data of Telegram Mini-App | TypeScript & Python
import hmac
def checkValidateInitData(hash_str, init_data, token, c_str="WebAppData"):
"""
Validates the data received from the Telegram web app, using the
method documented here:
https://core.telegram.org/bots/webapps#validating-data-received-via-the-web-app
hash_str - the has string passed by the webapp
init_data - the query string passed by the webapp
@Malith-Rukshan
Malith-Rukshan / example.py
Last active October 27, 2021 06:53
API Bч 👻 𝚂𝚒𝚗𝚐𝚕𝚎 𝙳𝚎𝚟𝚎𝚕𝚘𝚙𝚎𝚛𝚜 ✌️
import requests
import json
servers=json.loads(requests.get('https://single-developers.herokuapp.com/servers').content)
for server in servers:
id=str(server)
ip=servers[str(server)]['ip']
location=servers[str(server)]['location']
emoji=servers[str(server)]['emoji']
print(