Skip to content

Instantly share code, notes, and snippets.

View raspiduino's full-sized avatar

gvl610 raspiduino

View GitHub Profile
@raspiduino
raspiduino / readme.md
Last active June 9, 2026 11:56
Self-stream Android camera to RTSP (or whatever ffmpeg can output) in background using scrcpy-server (you can modify for non-root)

I don't have root!

See the No Root section.

Why?

I use old Android devices as headless, remotely-controlled servers and IP cameras. I don't see anything fits my requirements of being open source, hardware-encoded, and customizable. Beside this is fun and give you total control of your flow. This is adapted from an internal project.

Currently the script is encoding H.264, but you can modify the script to stream H.265 (if your device supports it) by changing video_codec to h265 for scrcpy-server and -f h264 to -f hevc for ffmpeg.

@raspiduino
raspiduino / tcvn3_to_unicode.py
Created June 1, 2026 15:31
Convert from TCVN3 to Unicode. I hate this.
import sys
tcvnchars = [
'µ', '¸', '¶', '·', '¹',
'¨', '»', '¾', '¼', '½', 'Æ',
'©', 'Ç', 'Ê', 'È', 'É', 'Ë',
'®', 'Ì', 'Ð', 'Î', 'Ï', 'Ñ',
'ª', 'Ò', 'Õ', 'Ó', 'Ô', 'Ö',
'×', 'Ý', 'Ø', 'Ü', 'Þ',
'ß', 'ã', 'á', 'â', 'ä',
@raspiduino
raspiduino / iykyk.js
Last active March 4, 2026 20:36
Iykyk
var s=document.createElement('style');s.innerHTML='.ftgla1i,.locked-ui-rewrite-card-module_obscured_yqnnb{all:unset!important;}';document.head.appendChild(s);
@raspiduino
raspiduino / readme.md
Last active November 29, 2025 01:28
Fix PCIe allocation error when connecting RTX50xx series eGPU to Linux laptop via Thunderbolt

Fix PCIe allocation error when connecting RTX50xx series eGPU to Linux laptop via Thunderbolt

UPDATE: Ubuntu 25.10 completely fixed this issue. This fix is NOT required for Ubuntu 25.10

TLDR

Skip to solution

Introduction

https://www.youtube.com/watch?v=_36yNWw_07g

@raspiduino
raspiduino / provider.py
Created July 11, 2025 09:23
Minimal(?) Open-WebUI setup for using as chat frontend (NO local inference included)
import os
import shutil
import json
import logging
import re
from abc import ABC, abstractmethod
from typing import BinaryIO, Tuple, Dict
from open_webui.config import (
S3_ACCESS_KEY_ID,
@raspiduino
raspiduino / readme.md
Created June 16, 2025 15:53
How to download undownloadable PDF from Heyzine flipbook (as of June 2025)

How to download undownloadable PDF from Heyzine flipbook (as of June 2025)

(Seriously?)

The following instructions are for Chrome, user may perform similar actions when using other browsers

  • Step 1: F12 inspect the flipbook page
  • Step 2: Go to Application then Session storage and click on https://heyzine.com and you should see this: image
  • Step 3: Get PDF url from the Key column. Original key should be something like hz_cache_1201_p_10_normal_https://cdnc.heyzine.com/files/uploaded/v3/[REDACTED].pdf.
  • Step 4: Your PDF is at https://cdnc.heyzine.com/files/uploaded/v3/[REDACTED].pdf
  • Step 5: Enjoy!
@raspiduino
raspiduino / ptz.py
Last active May 20, 2026 14:19
Onvif PTZ controller for Yoosee camera (might work for other camera but not tested) with minimum dependencies (only requests)
#!/usr/bin/python3
import os
import base64
import hashlib
from datetime import datetime, timezone
import requests
from http.client import RemoteDisconnected
# This function is literally imported from Gemini, I can't write comments *this* detailed and format *this* properly :)
def generate_soap_header_values(plain_password: str) -> dict:
@raspiduino
raspiduino / readme.md
Created May 19, 2025 04:14
Stream H.265 RTSP to Youtube HLS

Collection of stupid methods to stream H.265 RTSP from an IP camera to Youtube without video transcoding

Why?

I have a IP cam that output RTSP stream with:

  • H.265 video codec
  • Weird resolution of 1920x2160 (which is the result of stacking two 1920x1080 streams vertically into one frame)
  • Super unstable timing (pts + dts is not even provided)
  • 15fps when stable (yes that's what the camera output)

and I want to stream that to Youtube (using ffmpeg)

@raspiduino
raspiduino / log.txt
Last active January 16, 2025 13:29
Cracking RSA-157 key for signing Nokia MRE app (see first comment)
This file has been truncated, but you can view the full file.
root@cado:~# mkdir crack
root@cado:~# cd cado-nfs/
root@cado:~/cado-nfs# ./cado-nfs.py 7071142888328001159781190611496955124398513403641364137666269609876069075501385806782438994383629333720075608597235677504440240558571591145514673066702347 server.address=192.168.1.9 server.ssl=no server.whitelist=REDACTED workdir=/root/crack/
Info:root: Using default parameter file ./parameters/factor/params.c155
Info:root: No database exists yet
Info:Database: Database URI is db:sqlite3:///root/crack//c155.db
Info:Database: Opened connection to database /root/crack//c155.db
Info:root: Set tasks.linalg.bwc.threads=20 based on detected physical cores
Info:root: Set tasks.threads=20 based on detected logical cpus
Info:root: tasks.threads = 20 [via tasks.threads]
@raspiduino
raspiduino / 55-min-idle-confirm.js
Created November 2, 2024 13:14
If you know, you know
setInterval(function() {var c_f_b = document.querySelector("#alert_o_o"); if (c_f_b !== null) {c_f_b.click();}}, 30000);