Skip to content

Instantly share code, notes, and snippets.

View afreeorange's full-sized avatar
🐙

Nikhil Anand afreeorange

🐙
View GitHub Profile
@afreeorange
afreeorange / subtitle-shifter.py
Created September 20, 2023 21:37
Quick script to offset subtitles in .srt files
"""
Quick script to offset subtitles in .srt files. Didn't
Google first to realize that this exists:
https://github.com/byroot/pysrt
Oh well.
"""
import re
@afreeorange
afreeorange / convertStreamToBuffer.js
Created August 7, 2023 22:44
Convert a Node Stream to a Buffer
const convertStreamToBuffer = async (
stream: NodeJS.ReadableStream
): Promise<Buffer> => {
return new Promise((resolve, reject) => {
let buffers: Uint8Array[] = [];
stream.on("data", (data) => {
buffers.push(data);
});
@afreeorange
afreeorange / cloudSettings
Last active October 14, 2021 19:48
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-10-14T19:48:42.588Z","extensionVersion":"v3.4.3"}