Created
November 4, 2025 18:36
-
-
Save felixrieseberg/d91888202d7eea7f4650c90940b45c28 to your computer and use it in GitHub Desktop.
Happy Birthday, Ben!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check for --quick flag | |
| QUICK_MODE=false | |
| if [[ "$1" == "--quick" ]]; then | |
| QUICK_MODE=true | |
| fi | |
| # Colors | |
| RED='\033[0;31m' | |
| YELLOW='\033[1;33m' | |
| GREEN='\033[0;32m' | |
| BLUE='\033[0;34m' | |
| MAGENTA='\033[0;35m' | |
| CYAN='\033[0;36m' | |
| WHITE='\033[1;37m' | |
| BOLD='\033[1m' | |
| RESET='\033[0m' | |
| # Background colors | |
| BG_RED='\033[41m' | |
| BG_YELLOW='\033[43m' | |
| BG_GREEN='\033[42m' | |
| BG_BLUE='\033[44m' | |
| BG_MAGENTA='\033[45m' | |
| BG_CYAN='\033[46m' | |
| # Get terminal size | |
| COLUMNS=$(tput cols) | |
| LINES=$(tput lines) | |
| # Hide cursor | |
| tput civis | |
| # Cleanup function | |
| cleanup() { | |
| tput cnorm # Show cursor | |
| clear | |
| } | |
| trap cleanup EXIT | |
| # Function to print centered text | |
| print_centered() { | |
| local text="$1" | |
| local cols=${2:-$COLUMNS} | |
| # Strip ANSI color codes to get actual display length | |
| local stripped=$(echo -e "$text" | sed 's/\x1b\[[0-9;]*m//g') | |
| local length=${#stripped} | |
| local padding=$(( (cols - length) / 2 )) | |
| printf "%${padding}s" "" | |
| echo -e "$text" | |
| } | |
| # Function to generate random confetti | |
| random_confetti() { | |
| local colors=("$RED" "$YELLOW" "$GREEN" "$BLUE" "$MAGENTA" "$CYAN" "$WHITE") | |
| local chars=("*" "+" "·" "•" "○" "◦" "✦" "✧" "★") | |
| local num_confetti=$1 | |
| for ((i=0; i<num_confetti; i++)); do | |
| local col=$((RANDOM % COLUMNS)) | |
| local color=${colors[$((RANDOM % ${#colors[@]}))]} | |
| local char=${chars[$((RANDOM % ${#chars[@]}))]} | |
| tput cup $((RANDOM % LINES)) $col | |
| echo -en "${color}${char}${RESET}" | |
| done | |
| } | |
| # Skip animations in quick mode | |
| if [ "$QUICK_MODE" = false ]; then | |
| # Animated confetti explosion | |
| clear | |
| for frame in {1..15}; do | |
| clear | |
| random_confetti $((frame * 8)) | |
| sleep 0.08 | |
| done | |
| sleep 0.5 | |
| # Countdown | |
| for i in 3 2 1; do | |
| clear | |
| tput cup $((LINES/2 - 2)) 0 | |
| print_centered "${BOLD}${CYAN}${i}${RESET}" | |
| sleep 0.5 | |
| done | |
| # Big reveal with flashing colors | |
| for flash in {1..3}; do | |
| clear | |
| tput cup $((LINES/2 - 5)) 0 | |
| echo "" | |
| print_centered "${BG_MAGENTA}${WHITE} ${RESET}" | |
| print_centered "${BG_MAGENTA}${WHITE} 🎊 🎉 🎈 HAPPY BIRTHDAY BEN! 🎈 🎉 🎊 ${RESET}" | |
| print_centered "${BG_MAGENTA}${WHITE} ${RESET}" | |
| sleep 0.15 | |
| clear | |
| tput cup $((LINES/2 - 5)) 0 | |
| echo "" | |
| print_centered "${BG_CYAN}${WHITE} ${RESET}" | |
| print_centered "${BG_CYAN}${WHITE} 🎊 🎉 🎈 HAPPY BIRTHDAY BEN! 🎈 🎉 🎊 ${RESET}" | |
| print_centered "${BG_CYAN}${WHITE} ${RESET}" | |
| sleep 0.15 | |
| done | |
| fi | |
| # Final display | |
| clear | |
| # Top confetti border | |
| for ((i=0; i<3; i++)); do | |
| echo -en " " | |
| for ((j=0; j<$((COLUMNS/3)); j++)); do | |
| colors=("$RED" "$YELLOW" "$GREEN" "$BLUE" "$MAGENTA" "$CYAN") | |
| echo -en "${colors[$((RANDOM % 6))]}★${RESET} " | |
| done | |
| echo -e "" | |
| done | |
| # Main birthday message with ASCII art | |
| tput cup $((LINES/2 - 8)) 0 | |
| echo "" | |
| echo "" | |
| print_centered "${RED}██${RESET} ${RED}██${RESET} ${BLUE}▄▄▄${RESET} ${MAGENTA}██████${RESET} ${CYAN}██████${RESET} ${YELLOW}██${RESET} ${YELLOW}██${RESET}" | |
| print_centered "${RED}██${RESET} ${RED}██${RESET} ${BLUE}█${RESET} ${BLUE}█${RESET} ${BLUE}█${RESET} ${MAGENTA}██${RESET} ${MAGENTA}██${RESET} ${CYAN}██${RESET} ${CYAN}██${RESET} ${YELLOW}██${RESET} ${YELLOW}██${RESET}" | |
| print_centered "${RED}██████${RESET} ${BLUE}█████${RESET} ${MAGENTA}██████${RESET} ${CYAN}██████${RESET} ${YELLOW} ████${RESET} " | |
| print_centered "${RED}██${RESET} ${RED}██${RESET} ${BLUE}█${RESET} ${BLUE}█${RESET} ${MAGENTA}██${RESET} ${CYAN}██${RESET} ${YELLOW}██${RESET} " | |
| print_centered "${RED}██${RESET} ${RED}██${RESET} ${BLUE}█${RESET} ${BLUE}█${RESET} ${MAGENTA}██${RESET} ${CYAN}██${RESET} ${YELLOW}██${RESET} " | |
| echo "" | |
| echo "" | |
| print_centered "${BOLD}${CYAN}🎂 BIRTHDAY, BEN! 🎂${RESET}" | |
| echo "" | |
| echo "" | |
| # Animated cake | |
| print_centered "${YELLOW} ✦${RESET} ${RED}✧${RESET} ${BLUE}★${RESET} ${MAGENTA}✦${RESET}" | |
| print_centered "${MAGENTA} ${BOLD}|${RESET} ${BOLD}${RED}|${RESET} ${BOLD}${BLUE}|${RESET} ${BOLD}${MAGENTA}|${RESET}" | |
| print_centered "${MAGENTA} ${BOLD}|||${RESET} ${BOLD}${RED}|||${RESET} ${BOLD}${BLUE}|||${RESET} ${BOLD}${MAGENTA}|||${RESET}" | |
| print_centered "${MAGENTA} ${BOLD}(|||)${RESET} ${BOLD}${RED}(|||)${RESET} ${BOLD}${BLUE}(|||)${RESET} ${BOLD}${MAGENTA}(|||)${RESET}" | |
| print_centered "${BLUE} ═════════════════════════${RESET}" | |
| print_centered "${BLUE} ║${CYAN}▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓${BLUE}║${RESET}" | |
| print_centered "${BLUE} ║${CYAN}░░${WHITE}CELEBRATING YOU!${CYAN}░░${BLUE}║${RESET}" | |
| print_centered "${BLUE} ║${CYAN}▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓${BLUE}║${RESET}" | |
| print_centered "${GREEN} ║${YELLOW}█████████████████████${GREEN}║${RESET}" | |
| print_centered "${GREEN} ║${YELLOW}█████████████████████${GREEN}║${RESET}" | |
| print_centered "${GREEN} ║${YELLOW}█████████████████████${GREEN}║${RESET}" | |
| print_centered "${GREEN} ╚═════════════════════════╝${RESET}" | |
| echo "" | |
| print_centered "${BOLD}${WHITE}🎁 Hope your special day is absolutely AMAZING! 🎁${RESET}" | |
| echo "" | |
| # Confetti finale - full screen explosion | |
| sleep 1 | |
| # Save cursor position to restore main display | |
| main_display_start=$((LINES/2 - 10)) | |
| main_display_end=$((LINES/2 + 15)) | |
| for wave in {1..8}; do | |
| for ((i=0; i<15; i++)); do | |
| col=$((RANDOM % COLUMNS)) | |
| row=$((RANDOM % LINES)) | |
| # Skip rows that would overlap with the main display area | |
| if [ $row -ge $main_display_start ] && [ $row -le $main_display_end ]; then | |
| continue | |
| fi | |
| colors=("$RED" "$YELLOW" "$GREEN" "$BLUE" "$MAGENTA" "$CYAN" "$WHITE") | |
| chars=("★" "✦" "✧" "◆" "●" "♥" "🎉" "🎊" "🎈") | |
| tput cup $row $col | |
| echo -en "${colors[$((RANDOM % 7))]}${chars[$((RANDOM % 9))]}${RESET}" | |
| done | |
| sleep 0.1 | |
| done | |
| # Bottom message | |
| tput cup $((LINES - 2)) 0 | |
| print_centered "${BOLD}${WHITE}✨ Wishing you an incredible year ahead! ✨${RESET}" | |
| sleep 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment