Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am peme969 on github.
  • I am peme969 (https://keybase.io/peme969) on keybase.
  • I have a public key ASAHh5F7ku54pjRIK0crL6UQSrdsE6NCvmxIfB6L2tEGBAo

To claim this, I am signing this object:

@peme969
peme969 / main.py
Created January 30, 2025 05:08
Generate alerts with custom themes or a custom defined dictionary! Colorized and styled with the python rich library!
import textwrap
from rich.text import Text
from rich.console import Console
console = Console()
def strip_ansi_codes(text):
ansi_escape = re.compile(r'\x1B[@-_][0-?]*[ -/]*[@-~]')
return ansi_escape.sub('', text)
def block_quote(title, text, theme='yellow', width=55):
preset_themes = {
'yellow': {'color': 'yellow', 'icon': '⚠️', 'style': 'bold yellow'},
@peme969
peme969 / license.code
Created January 14, 2025 02:52
License
Copyright (c) 2025 Peme969
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in