Skip to content

Instantly share code, notes, and snippets.

@qsLI
Last active April 28, 2021 03:32
Show Gist options
  • Save qsLI/852f854b029578f0e8719a66039eff9d to your computer and use it in GitHub Desktop.
Save qsLI/852f854b029578f0e8719a66039eff9d to your computer and use it in GitHub Desktop.
http server
while true ; do echo -e "HTTP/1.1 200 OK\nContent-Length: 1\n\n $(date)" | nc -l -p 7777 ; done
# watch alternative for macos
while :;
do
clear
date
netstat -nat | grep ::1.8080 | sort -k3
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment