Created
July 9, 2016 18:17
-
-
Save slawekzachcial/972847fa05c4563448b885cd532408c7 to your computer and use it in GitHub Desktop.
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 | |
PROMPT="\n$ " | |
DELAY_COMMENT_CHAR="0.1s" | |
DELAY_COMMENT="1s" | |
DELAY_RUN="3s" | |
GRAY="\033[1;30m" | |
LIGHT_GRAY="\033[0;37m" | |
CYAN="\033[0;36m" | |
LIGHT_CYAN="\033[1;36m" | |
NO_COLOR="\033[0m" | |
function prepare { | |
for i in {3..1}; do | |
printf "%c..." $i | |
sleep 1s | |
done | |
clear | |
printf "${PROMPT}" | |
sleep 1s | |
} | |
function comment { | |
local msg="$1" | |
printf "${LIGHT_CYAN}" | |
for i in $(seq 0 ${#msg}); do | |
printf "%c" "${msg:$i:1}" | |
sleep "${DELAY_COMMENT_CHAR}" | |
done | |
printf "${NO_COLOR}\n${PROMPT}" | |
sleep "${DELAY_COMMENT}" | |
} | |
function run { | |
local cmd="$1" | |
printf "%s\n" "${cmd}" | |
sleep "${DELAY_RUN}" | |
eval "${cmd}" | |
printf "${PROMPT}" | |
} | |
prepare | |
comment '# JSONTest.com is a testing platform for services utilizing JavaScript Object Notation (JSON)' | |
run 'curl --silent http://headers.jsontest.com | jq -C' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment