Skip to content

Instantly share code, notes, and snippets.

@JuniorJPDJ
JuniorJPDJ / zipfile.patch
Last active August 31, 2020 02:11
patched cpython's zipfile.py supporting non-naive seeking on STORED compression method (no compression at all)
809c809
< self._expected_crc = zipinfo.CRC
---
> self._expected_crc = self._orig_crc = zipinfo.CRC
812c812
< self._expected_crc = None
---
> self._expected_crc = self._orig_crc = None
1043c1043
< def seek(self, offset, whence=0):
@JuniorJPDJ
JuniorJPDJ / cue_cdtoc2mbtoc.py
Last active September 25, 2020 14:28
CUE Sheet and CUETools CDTOC tag to MusicBrainz TOC converter, ISRC extractor
#!/usr/bin/env python3
from typing import List
import os, io, base64, hashlib
import mutagen
import chardet
SECTORS_PER_SECOND = 75
SAMPLES_PER_SECTOR = 588
@JuniorJPDJ
JuniorJPDJ / download.py
Last active February 28, 2021 16:38
telegram batch file downloader (with deduplication and file date preserving)
#!/usr/bin/env python3
import hashlib
import os
import time
import traceback
from datetime import datetime
import argparse
import re
from telethon import TelegramClient, helpers, utils
@JuniorJPDJ
JuniorJPDJ / foss-android-pl.txt
Last active April 15, 2021 16:08
FOSS-Android
Baza systemu:
LineageOS
Kontynuacja (fork) porzuconego projektu CyanogenMod, bardzo dobrego i szanowanego w gronach moderskich systemu operacyjnego opartego na czystym Androidzie
Jeden ze stabilniejszych "custom romów" na smartfony, wspiera sporą liczbę urządzen oficialnie i praktycznie każde dostępne na rynku nieoficialnie (ludzie budują go jako bazę deweloperską)
Oficialna strona: https://lineageos.org/
Źródła: https://github.com/LineageOS
@JuniorJPDJ
JuniorJPDJ / yt-search-rss.gs
Last active July 15, 2023 20:38
Youtube Search RSS generator (deployable on Google Apps Script)
function getSearchRSS(query){
let results = YouTube.Search.list('id, snippet', {
q: query,
maxResults: 50,
order: 'date'
});
let encoded_query = encodeURIComponent(query)
let rss_url = ScriptApp.getService().getUrl() + "?" + encoded_query;