Skip to content

Instantly share code, notes, and snippets.

@guidocella
guidocella / avgle-download.sh
Last active June 7, 2024 13:38
Download videos from avgle.com
#!/bin/sh
if [ $# -lt 2 ]; then
echo Usage: avgle-download.sh video_title url_of_last_segment
exit 1
fi
# Visit a video page, open the network tab of the dev tools,
# seek to the end of the video and copy the url of the last .ts segment
# (the .m3u8 playlist is encoded and therefore harder to get).
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 4, 2024 10:09
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@thelinuxkid
thelinuxkid / subprocess_stream.py
Last active December 4, 2023 06:43
Get a Python subprocess' output without buffering. Normally when you want to get the output of a subprocess in Python you have to wait until the process finishes. This is bad for long running processes. Here's a way to get the output unbuffered (in real-time.)
import contextlib
import subprocess
# Unix, Windows and old Macintosh end-of-line
newlines = ['\n', '\r\n', '\r']
def unbuffered(proc, stream='stdout'):
stream = getattr(proc, stream)
with contextlib.closing(stream):
while True:
out = []