Skip to content

Instantly share code, notes, and snippets.

@oliveratgithub
Last active December 25, 2025 23:25
Show Gist options
  • Select an option

  • Save oliveratgithub/7d9201b828c5156657c03a2fb6bd5941 to your computer and use it in GitHub Desktop.

Select an option

Save oliveratgithub/7d9201b828c5156657c03a2fb6bd5941 to your computer and use it in GitHub Desktop.
Simple one-liner curl command for macOS/Unix bash terminal to repeatedly check a specific url
# Remark: list of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "https://github.com" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 5; done
# The following variation adds a dynamic cache busting query parameter to every request
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "https://github.com/?nocache=$(od -An -N2 -i /dev/random | tr -d ' ')" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment