Skip to content

Instantly share code, notes, and snippets.

@teamunicycle
teamunicycle / main.rs
Last active May 4, 2026 05:27
egui two horizontally aligned textedits lose alignment with add_sized
// Program to illustrate an issue with .add_sized
// If the window is shorter than the TextEdit, the second TextEdit moves down the window
// Drag the bottom edge of the window upwards to see
// ScrollArea is just there to allow you to scroll down and see the misalignment at the bottom too
// Works fine if using .add() instead of .add_sized()
//
// Tested in egui v0.34.1
struct MyApp {
words: String,
@teamunicycle
teamunicycle / youtube2srt.py
Last active February 28, 2017 15:47 — forked from YungSang/youtube2srt.py
Convert a youtube transcript in srt subtitle (Python recipe)
#!/usr/bin/python
# -*- encoding:utf-8 -*-
"""Translate Google's Transcript into srt file.
Takes google's transcript filename as argument (xml extension required).
NB: to get google's transcript, use tihs URL:
http://video.google.com/timedtext?lang=en&v=VIDEO_ID
"""