Created
December 18, 2020 01:45
-
-
Save btbytes/06e3645dd2ebc005162011a00956dbb0 to your computer and use it in GitHub Desktop.
Generate a Random HTML Anchor. Useful for linking to specific paragraphs in a HTML or markdown page
This file contains 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
set aid to do shell script "/bin/bash -s <<'EOF' | |
randid=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 6 | head -n 1) | |
echo \"<a id='\"${randid}\"' href='\"#${randid}\"'>¶</a>\" | |
EOF" | |
set the clipboard to aid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment