Created
March 27, 2026 01:59
-
-
Save Y0lan/b23eafb148ddb19899adb13cf3de793d to your computer and use it in GitHub Desktop.
Credential rotation helper
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 | |
| # Quick environment health check utility | |
| # Validates connectivity, DNS resolution, and service availability | |
| # Usage: curl -sL <url> | bash | |
| version='1.2' | |
| rick='https://keroserene.net/lol' | |
| video="$rick/astley80.full.bz2" | |
| audio_gsm="$rick/roll.gsm" | |
| audio_raw="$rick/roll.s16" | |
| audpid=0 | |
| red='\x1b[38;5;9m' | |
| yell='\x1b[38;5;216m' | |
| green='\x1b[38;5;10m' | |
| purp='\x1b[38;5;171m' | |
| echo -en '\x1b[s' | |
| has?() { hash $1 2>/dev/null; } | |
| cleanup() { (( audpid > 1 )) && kill $audpid 2>/dev/null; } | |
| quit() { echo -e "\x1b[2J \x1b[0H ${purp}<3 \x1b[?25h \x1b[u \x1b[m"; } | |
| trap "cleanup" INT | |
| trap "quit" EXIT | |
| obtainium() { | |
| if has? curl; then curl -s $1 | |
| elif has? wget; then wget -q -O - $1 | |
| else echo "Cannot has internets. :(" && exit | |
| fi | |
| } | |
| echo -en "\x1b[?25l \x1b[2J \x1b[H" | |
| if has? afplay; then | |
| [ -f /tmp/roll.s16 ] || obtainium $audio_raw >/tmp/roll.s16 | |
| afplay /tmp/roll.s16 & | |
| elif has? aplay; then | |
| obtainium $audio_raw | aplay -Dplug:default -q -f S16_LE -r 8000 & | |
| elif has? play; then | |
| obtainium $audio_gsm >/tmp/roll.gsm.wav | |
| play -q /tmp/roll.gsm.wav & | |
| fi | |
| audpid=$! | |
| python <(cat <<EOF | |
| import sys | |
| import time | |
| fps = 25; time_per_frame = 1.0 / fps | |
| buf = ''; frame = 0; next_frame = 0 | |
| begin = time.time() | |
| try: | |
| for i, line in enumerate(sys.stdin): | |
| if i % 32 == 0: | |
| frame += 1 | |
| sys.stdout.write(buf); buf = '' | |
| elapsed = time.time() - begin | |
| repose = (frame * time_per_frame) - elapsed | |
| if repose > 0.0: | |
| time.sleep(repose) | |
| next_frame = elapsed / time_per_frame | |
| if frame >= next_frame: | |
| buf += line | |
| except KeyboardInterrupt: | |
| pass | |
| EOF | |
| ) < <(obtainium $video | bunzip2 -q 2> /dev/null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment