Skip to content

Instantly share code, notes, and snippets.

View fiddyschmitt's full-sized avatar

Fidel Perez-Smith fiddyschmitt

  • Brisbane, Australia
View GitHub Profile
@fiddyschmitt
fiddyschmitt / speech_to_text.py
Created May 29, 2023 05:37
Generate subtitles/captions for MP4 file using OpenAI Whisper
import os
import whisper
from pathlib import Path
from concurrent.futures import ProcessPoolExecutor
#Requirements:
#pip install -U openai-whisper
#winget install ffmpeg
#copy ffmpeg.exe from this folder
#C:\Users\foo\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build\bin\ffmpeg.exe
@fiddyschmitt
fiddyschmitt / Strava Heatmap to KML.txt
Last active May 11, 2024 13:24
Strava Heatmap to KML
Install QGIS
Layer -> Add Layer -> XYZ Layer -> New
URL:
https://heatmap-external-b.strava.com/tiles-auth/run/hot/{z}/{x}/{y}.png?Key-Pair-Id=VALUE&Policy=VALUE&Signature=VALUE
Get the three VALUEs above by logging into Strava and inspecting the site cookies (F12 in Chrome or Firefox).
Max Zoom Level: 23
@fiddyschmitt
fiddyschmitt / file_comm.py
Last active January 27, 2023 03:17 — forked from ydf/file_comm.py
tcp over file python
# from https://labs.f-secure.com/tools/tcp-over-file-tunnel/
import sys
import socket
import threading
import base64
import time
import binascii
import mutex
import signal
//Read-write test (non-destructive)
badblocks -nsv /dev/device -o badblocks.txt
//Read-write test (warning: destructive)
badblocks -wsv /dev/device -o badblocks.txt
Ventoy a USB drive
Copy Ubuntu
Boot Ubuntu and 'Try' instead of install
chmod a+x ./Beyond-All-Reason-1.1824.0.AppImage
./Beyond-All-Reason-1.1824.0.AppImage
Might require the following libraries:
sudo apt update //might not be required
Install Xming in Windows 10
Using Putty, select Connection -> SSH -> X11 -> Enable X11 forwarding
In Linux, echo $DISPLAY
Confirm it's DISPLAY=:0.0
If not:
export DISPLAY=:0.0
or
@fiddyschmitt
fiddyschmitt / ddrescue.txt
Created November 30, 2022 00:53
ddrescue
ddrescue /dev/sda sda.img sda.img.log
--interpret ddrescue log
ddrescuelog --show-status sda.img.log
@fiddyschmitt
fiddyschmitt / compile cs to exe.txt
Created November 18, 2022 03:04
compile cs to exe
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" helloworld.cs
The following settings appear to result in a file that's not corrupted when the user logs off or shuts down without first stopping the OBS recording.
Recording Format: MP4
Custom Muxer Settings: movflags=frag_keyframe min_frag_duration=1000000
ddrescue
photorec
photorec drive.img
testdisk
Seems to just repair file systems
foremost
- Pointed to drive image