Skip to main content

Command Palette

Search for a command to run...

Happy Halloween From aialchemist.dev ⚗️

Cursed Terminal

Updated
4 min read
Happy Halloween From aialchemist.dev ⚗️
E

print("Hello, World!") AI Alchemist 🧙‍♂️🤖 ⚗️ For 13 years, I lived a life straight out of a Hollywood action movie—high stakes, rapid decisions, and no room for error. Now, I channel that same intensity into a different arena: solving complex technical challenges as a Technical Program Manager.I specialize in SaaS implementations with a focus on Operational Awareness. Think of me as an architect of clarity—designing systems that don’t just function, but make a difference. I transform raw data into actionable intelligence, bridging the gap between chaos and insight.But when the day job ends, my real passion takes over. I’m deep in Python, building solutions that blur the line between digital and physical. I see a challenge and ask, “How can I automate this?” or “What if AI could make this smarter?” Artificial Intelligence is my playground, and through the laws of equivalent exchange, I turn abstract ideas into powerful, real world solutions. That’s why I call myself the AI Alchemist—I don’t just write code; I transmute possibilities into power.🔥 What Drives Me AI Innovator – Passionate about machine learning, neural networks, and generative AI.Problem Solver – I thrive on tackling complex challenges and designing scalable, intelligent solutions.Creative Coder – Python is my transmutation circle, and algorithms are my ingredients.Tech Evangelist – I love sharing insights and helping others harness AI’s potential.🚀 What I’m Building AI driven tools to enhance operational efficiency and decision making.Innovative projects that push the limits of AI and automation.Explorations at the intersection of AI, SaaS, and real world impact.🌟 Why Follow Me? If you’re into AI, SaaS, Python, or just love seeing tech that actually makes a difference, stick around. I share insights, projects, and information as I navigate the ever evolving world of AI.🧪 The AI Alchemist Turning ideas into innovation, one line of code at a time.

Cursed Terminal

A cursed terminal animation using colors, emojis, and glitch effects.
aialchemist.dev ⚗️

Run if you dare... 💀🦇

import os
import random
import shutil
import sys
import time

# Initialize color support on Windows
try:
    import colorama
    colorama.init()
except Exception:
    pass

ESC = "\033["
RESET = ESC + "0m"
BOLD = ESC + "1m"
INVERT = ESC + "7m"
HIDE_CURSOR = ESC + "?25l"
SHOW_CURSOR = ESC + "?25h"
DIM = ESC + "2m"

def fg(code): return f"{ESC}38;5;{code}m"
def bg(code): return f"{ESC}48;5;{code}m"

# Colors (256-color friendly)
RED = fg(196)
DARK_RED_BG = bg(52)
ORANGE = fg(208)
YELLOW = fg(226)
GREEN = fg(46)
WHITE = fg(15)

def clear():
    os.system('cls' if os.name == 'nt' else 'clear')

def beep(n=1):
    for _ in range(n):
        sys.stdout.write('\a')
        sys.stdout.flush()
        time.sleep(0.06)

def safe_print(s="", end="\n", flush=True):
    sys.stdout.write(s + end)
    if flush:
        sys.stdout.flush()

def glitch_text(text, glitch_chance=0.08, min_visible_fraction=0.6):
    glitch_chars = ['#', '%', '@', '&', '░', '▓', '█', '§', '∆', 'π', 'ø', '?']
    out = []
    total = len(text)
    min_visible = int(total * min_visible_fraction)
    indices = list(range(total))
    random.shuffle(indices)
    visible_indices = set(indices[:min_visible])
    for i, ch in enumerate(text):
        if ch.isspace():
            out.append(ch)
        elif i in visible_indices:
            out.append(ch)
        else:
            out.append(random.choice(glitch_chars) if random.random() < glitch_chance else ch)
    return "".join(out)

def spooky_typing(text, speed=0.03, glitch_chance=0.06):
    glitch_chars = ['░', '#', '%', '?']
    for ch in text:
        if ch == "\n":
            sys.stdout.write("\n")
            sys.stdout.flush()
            continue
        if random.random() < glitch_chance and not ch.isspace():
            g = random.choice(glitch_chars)
            sys.stdout.write(g)
            sys.stdout.flush()
            time.sleep(max(0.01, speed * 0.5))
            sys.stdout.write("\b")
            sys.stdout.write(ch)
            sys.stdout.flush()
        else:
            sys.stdout.write(ch)
            sys.stdout.flush()
        time.sleep(speed)
    sys.stdout.write("\n")
    sys.stdout.flush()

def fill_symbols_line(cols, symbols):
    return "".join(random.choice(symbols) for _ in range(cols))

def print_centered_glitch(msg, cols, color=WHITE, glitch_chance=0.12, reveal_delay=0.28):
    pad = max(0, (cols - len(msg)) // 2)
    glitch_line = " " * pad + glitch_text(msg, glitch_chance=glitch_chance, min_visible_fraction=0.65)
    safe_print(color + glitch_line + RESET)
    time.sleep(reveal_delay)
    sys.stdout.write("\033[F")
    sys.stdout.write("\r")
    sys.stdout.write(" " * cols + "\r")
    sys.stdout.flush()
    safe_print(BOLD + WHITE + " " * pad + msg + RESET)

MESSAGES = [
    "Do you feel watched?",
    "They learned how to whisper.",
    "The light is thinner here.",
    "Leave? There's no door.",
    "We have been waiting.",
    "Their voices echo in the static.",
    "It remembers every step."
]

SYMBOL_POOL = ['░','▒','▓','█','☠','👁','🕯','🩸','🎃','👹','💀','🦴']

def main():
    try:
        clear()
        cols, rows = shutil.get_terminal_size((80, 24))
        cols = max(40, cols)
        rows = max(20, rows)

        print(HIDE_CURSOR, end="")

        spooky_typing(DIM + "INITIALIZING CURSED INTERFACE..." + RESET, speed=0.04, glitch_chance=0.04)
        time.sleep(0.6)
        spooky_typing(DIM + "ANOMALY: PRESENCE DETECTED." + RESET, speed=0.04, glitch_chance=0.04)
        time.sleep(0.7)

        for _ in range(18):
            clear()
            for r in range(rows - 2):
                if r == rows // 2 and random.random() < 0.25:
                    msg = random.choice(MESSAGES)
                    print_centered_glitch(msg, cols, color=ORANGE, glitch_chance=0.10, reveal_delay=0.25)
                else:
                    line = fill_symbols_line(cols, SYMBOL_POOL)
                    color = random.choice([RED, ORANGE, YELLOW, GREEN, WHITE])
                    safe_print(color + line + RESET)
            time.sleep(0.08 + random.random()*0.04)

        for msg in MESSAGES[:4]:
            clear()
            safe_print(DARK_RED_BG + WHITE + BOLD)
            spooky_typing(" " * max(0, (cols - len(msg))//2) + glitch_text(msg, glitch_chance=0.10, min_visible_fraction=0.7),
                         speed=0.06, glitch_chance=0.06)
            sys.stdout.write("\033[F")
            sys.stdout.write("\r")
            sys.stdout.write(" " * cols + "\r")
            sys.stdout.flush()
            safe_print(BOLD + WHITE + " " * max(0, (cols - len(msg))//2) + msg + RESET)
            safe_print(RESET)
            beep(1)
            time.sleep(1.0)

        clear()
        spooky_typing(RED + "SYSTEM: MEMORY FISSURE DETECTED..." + RESET, speed=0.05, glitch_chance=0.04)
        leak = 100
        while leak > 0:
            bar_len = cols - 30
            filled = int((leak/100.0) * bar_len)
            bar = RED + "█" * filled + DIM + "░" * (bar_len - filled) + RESET
            safe_print("[" + bar + f"]  {leak}%")
            leak -= random.randint(4, 11)
            time.sleep(0.12)

        time.sleep(0.5)
        emojis = ['🎃','⚗️','💀','🩸','👁','👹','🦇','🕷']
        for _ in range(20):
            clear()
            for _ in range(rows - 2):
                line = "".join(random.choice(emojis + SYMBOL_POOL) for _ in range(cols//2))
                color = random.choice([RED, ORANGE, YELLOW])
                safe_print(color + line + RESET)
            if random.random() < 0.35:
                beep(1)
            time.sleep(0.06 + random.random()*0.05)

        for step in range(cols // 2 + 8):
            clear()
            lines = [" " * cols for _ in range(rows - 2)]
            r = rows // 2
            c = min(cols - 2, step * 2)
            l = list(lines[r])
            l[c] = '🕷'
            lines[r] = "".join(l)
            for i in range(rows - 2):
                if random.random() < 0.03:
                    tmp = list(lines[i])
                    idx = random.randint(0, cols - 1)
                    tmp[idx] = random.choice(['☠','👁','░','🎃'])
                    lines[i] = "".join(tmp)
            safe_print(GREEN + "\n".join(lines) + RESET)
            time.sleep(0.06)

        time.sleep(0.4)

        for i in range(26):
            clear()
            if i % 5 == 0:
                phrase = random.choice(["I SEE YOU", "STAY", "DON'T LOOK AWAY", "IT KNOWS", "NO ESCAPE"])
                print_centered_glitch(phrase, cols, color=DIM + ORANGE, glitch_chance=0.14, reveal_delay=0.18)
            else:
                for _ in range(rows // 3):
                    blast = "".join(random.choice(emojis + SYMBOL_POOL) for _ in range(cols//2))
                    safe_print(random.choice([RED, ORANGE, YELLOW]) + blast + RESET)
            if i in (8, 18):
                beep(2)
            time.sleep(0.06 + random.random()*0.05)

        time.sleep(0.3)

        for _ in range(6):
            clear()
            safe_print(INVERT + RED + " " * max(0, (cols - 20)//2) + "THEY ARE HERE" + " " * max(0, (cols - 20)//2) + RESET)
            beep(2)
            time.sleep(0.14)
            clear()
            time.sleep(0.06)

        clear()
        spooky_typing("...silence returns; the air is colder.", speed=0.05, glitch_chance=0.06)
        time.sleep(0.6)
        spooky_typing("System nominal. Happy Halloween from aialchemist.dev ⚗️", speed=0.06, glitch_chance=0.05)
        print(SHOW_CURSOR, end="")
        safe_print("\nPress ENTER to exit and restore the terminal.")
        try:
            input()
        except Exception:
            time.sleep(1.5)

    finally:
        sys.stdout.write(RESET + SHOW_CURSOR)
        sys.stdout.flush()
        clear()

if __name__ == "__main__":
    main()