Skip to content

Instantly share code, notes, and snippets.

@andyherbert
andyherbert / proposal.md
Last active February 11, 2025 03:26
ANSi Art File proposal

This is not meant to be a hard proposal for a new file format, it's just what I've occasionally thought about and decided to put out into the world to crystalize my own thinking and invite criticism.

Why a new ANSi Art file format?

.ANS files have limitations:

  • I can only use certain fonts, these are limited to IBM Codepages, Amiga fonts, and a few others. The XBin format allows a user-defined font to be used, but these can only be 8 pixels wide and up to 32 pixels high, what if I wanted to use a font only 4 pixels wide and 8 pixels high? Maybe I want to create my own font and give it a name that people can see.
  • SAUCE records are attached to the end of the file - this is problematic when streaming data, if you are defining how something should be displayed then you need to specify this before sending the data you're displaying, not afterwards.
  • SAUCE records are also fairly wasteful and contain lots of unused or padded bytes, this is especially true for records with comments, and strings have to be enc
@RoseSecurity
RoseSecurity / summarizer.py
Last active February 3, 2024 23:45
Don't have time to watch tutorials and technical videos? Need to quickly identify useful information? This script harnesses machine learning to summarize YouTube videos.
#!/usr/bin/env python3
import os
import argparse
import whisper
from pytube import YouTube
from transformers import pipeline
# Harness machine learning to summarize YouTube video transcriptions
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active April 16, 2025 07:57
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m
5 c at 5 b at jut Yet At At At At At At At At At At At At Pt Pt jut jut jut jut Qt jut at 111 1 t t t t t t t t t t t t t t t t Pt Pt Pt Pt jut j j j j at Bet At j Qt Rt St j j j j at 4 Kt Qt Qt Rt St j j Pt j at 311 1 t t 321 1 111 1 Bet Bet At t Qt Yet u h a a a a Q X 4 y P Y I I I I I I I I I I I I I I I I I 7 Q Z j A X P 0 A 0 A k A A Q 2 A B 2 B B 0 B B A B X P 8 A B u J I 4 q Y P M I F 0 u 8 V O v O 3 C 5 8 U 8 T o P b b I 2 N l I i s R p q C K 9 y q N P d K z m m P A A X X X X X X X X X X X X X
@bitsurgeon
bitsurgeon / youtube.md
Last active March 23, 2025 16:36
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">