Skip to content

Instantly share code, notes, and snippets.

View raspiduino's full-sized avatar

gvl610 raspiduino

View GitHub Profile
@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 22, 2025 16:24
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);
@raspiduino
raspiduino / console-log.txt
Created September 26, 2024 12:45
Building OpenSfM on Windows 11 with Visual Studio 2022
D:\dev>git clone --recursive https://github.com/mapillary/OpenSfM
D:\dev>cd OpenSfM
D:\dev\OpenSfM>git clone https://github.com/microsoft/vcpkg
Cloning into 'vcpkg'...
remote: Enumerating objects: 247401, done.
remote: Counting objects: 100% (59827/59827), done.
remote: Compressing objects: 100% (4389/4389), done.
remote: Total 247401 (delta 55699), reused 55438 (delta 55438), pack-reused 187574 (from 1)
Receiving objects: 100% (247401/247401), 75.41 MiB | 10.16 MiB/s, done.
Resolving deltas: 100% (164296/164296), done.
@raspiduino
raspiduino / readme.md
Last active September 3, 2024 03:32
About MemGPT's free endpoint

About MemGPT's free endpoint

MemGPT provides you a free endpoint for trying. It's at https://inference.memgpt.ai/chat/completions From official docs it's claimed that the free endpoint is running on variants of Mixtral 8x7b:

MemGPT Free Endpoint: select this if you'd like to try MemGPT on a top open LLM for free (currently variants of Mixtral 8x7b!)

However, after I manually try running Mixtral 8x7b on my own machine, I saw that the model cannot be compared to the free endpoint in term of accuracy (function calling + response). This makes me want to find out the real model behind this endpoint.

TL;DR:

Free endpoint just forwards your call to OpenAI's ChatGPT 3.5. However, I cannot be sure if they log our requests or not.

@raspiduino
raspiduino / deepsparse_object_detection_cv2.py
Created August 22, 2024 16:51
Object detection in Python with Deepsparse + OpenCV
# Import
import cv2
from deepsparse.pipeline import Pipeline
from deepsparse.yolo.schemas import YOLOInput
from deepsparse.yolo.utils import COCO_CLASSES
import time
# Model settings
task = "yolo"
model_path = "zoo:yolov5-l-coco-pruned.4block_quantized"
@raspiduino
raspiduino / readme.sh
Last active July 27, 2024 06:07
How to install memgpt on Termux
# Install required Termux packages
apt update
apt install openssh openssl openssl-1.1 proot-distro
# Setup ssh (optional)
passwd # Type your password here
whoami # Get your username
ifconfig # Get your IP
# Add openssl-1.1 library to path (otherwise curl and other programs won't work)
@raspiduino
raspiduino / FirstLogonAnim.html
Created July 23, 2024 04:14
Windows 11 OOBE first logon animation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
var uniqueId = 0;function genUniqueKeyframeName(){return"seq-"+uniqueId++}var uniqueId=0,SceneItem=function(n,t,i,r,u){n.style.visibility="visible";this.keyframe_sequence=u;this.element=n;this.animation_name=t;this.animation_duration=r;this.keyframes="@-ms-keyframes "+t+" {"+i+"}"},KeyframeSequencer=function(n){this._created_keyframes=[];this.container_element=n;this._sequences=[];var t=document.createElement("style");document.head.appendChild(t);this.stylesheet=t.sheet},ScenesManager;KeyframeSequencer.prototype.addSequence=function(n,t,i,r){var u={},e,s,f,o,h,c;for(u.element=n,u.keyframe_name=genUniqueKeyframeName(),u.keyframe_style_str="@-ms-keyframes "+u.keyframe_name+" {",e=0,f=0;f<t.length;f++)o=t[f].duration,e+=o;for(s=0,f=0;f<t.length;f++)o=t[f].duration,s+=o,h=s/e*100+"%",c=t[f].properties,u.keyframe_style_str+=h+"{"+c+"}";u.keyframe_style_str+="}";u.delay=i;u.duration=e+"s";u.fill_mode=r||"both";this._sequences.push(u)};Key