Skip to content

Instantly share code, notes, and snippets.

@JuniorJPDJ
JuniorJPDJ / yt-search-rss.gs
Last active Sep 15, 2021
Youtube Search RSS generator (deployable on Google Apps Script)
View yt-search-rss.gs
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;
View foss-android-pl.txt
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 / download.py
Last active Feb 28, 2021
telegram batch file downloader (with deduplication and file date preserving)
View download.py
#!/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 / cue_cdtoc2mbtoc.py
Last active Sep 25, 2020
CUE Sheet and CUETools CDTOC tag to MusicBrainz TOC converter, ISRC extractor
View cue_cdtoc2mbtoc.py
#!/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 / zipfile.patch
Last active Aug 31, 2020
patched cpython's zipfile.py supporting non-naive seeking on STORED compression method (no compression at all)
View zipfile.patch
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 / Dockerfile
Last active Aug 13, 2020
Dockerfile for telethon python bots
View Dockerfile
FROM python:alpine
WORKDIR /app
RUN chown nobody:nogroup /app \
&& apk add --no-cache --virtual .build-deps gcc build-base libffi-dev libressl-dev
ADD requirements.txt .
RUN pip install -r requirements.txt \
&& apk del .build-deps
@JuniorJPDJ
JuniorJPDJ / git-filter-repo.sh
Last active Apr 15, 2020
git filter-repo and amend commit date editing
View git-filter-repo.sh
// last commit
export GIT_COMMITTER_DATE="$(date -R --date="13 days ago")"; git commit --amend --date="$GIT_COMMITTER_DATE"
// selected dates
git filter-repo -f --commit-callback '
from datetime import datetime  46.175.47.49   96%  ─╯
d = commit.author_date.split()
date = datetime.fromtimestamp(int(d[0]))
if date.day == 2:
d[0]=str(int(d[0])+12*60*60).encode("ascii")
@JuniorJPDJ
JuniorJPDJ / wifi.sh
Last active Apr 10, 2020
Nexmon firmware replacing on-demand
View wifi.sh
#!/system/bin/sh
# place me in this folder:
export HOME="/sdcard/wifi"
# place patched firmware with this name
patched_path="$HOME/bcmdhd_sta.bin.patched"
backup_path="$HOME/bcmdhd_sta.bin.backup"
fw_path="/system/etc/wifi/bcmdhd_sta.bin"
View goclever_gcta741l_defconfig
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN6I=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_ZQ=251
CONFIG_MMC0_CD_PIN="PA8"
CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
CONFIG_USB0_ID_DET="PA15"
@JuniorJPDJ
JuniorJPDJ / prestigio-per5574bc_defconfig
Last active Nov 16, 2018
Prestigio Multireader Stream PER5574BC
View prestigio-per5574bc_defconfig
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN5I=y
CONFIG_DRAM_CLK=408
CONFIG_DRAM_EMR1=0
CONFIG_MMC0_CD_PIN="PG0"
CONFIG_USB0_VBUS_DET="PG1"
CONFIG_USB0_VBUS_PIN="PG12"
CONFIG_USB0_ID_DET="PG2"