Skip to content

Instantly share code, notes, and snippets.

View g30r93g's full-sized avatar
:octocat:
Crafting solutions for interesting problems.

George Nick Gorzynski g30r93g

:octocat:
Crafting solutions for interesting problems.
View GitHub Profile
@g30r93g
g30r93g / collection-view.tsx
Created February 21, 2025 16:38
Shadcn/UI Tanstack Virtual (based on UICollectionView)
"use client";
import { ComponentProps, useEffect, useRef } from "react";
import { useVirtualizer, useWindowVirtualizer } from "@tanstack/react-virtual";
import { Card, CardContent } from "@/components/ui/card";
import Link from "next/link";
import { cn } from "@/lib/utils";
interface CollectionItem {
href?: string;
@g30r93g
g30r93g / comment2cue.py
Created January 15, 2025 17:06
youtube-comment2cue
import re
if __name__ == '__main__':
# setup cuesheet entries
cuesheetEntries = []
# obtain comment
chapterComment = []
# commentFilename = input("Comment filename (txt) > ")
# with open(f"./{commentFilename}", 'r') as file:
@g30r93g
g30r93g / cue2timestamp.py
Created April 5, 2024 23:02
Convert a cue sheet file to YouTube timestamps
def parse_cue_sheet(filename):
"""Parses a CUE sheet and returns a list of track dictionaries.
Args:
filename: The path to the CUE sheet file.
Returns:
A list of dictionaries, where each dictionary contains the following keys:
order: The order of the track in the CUE sheet.
title: The title of the track.