<img id="asdf" name="getElementById" />
<script>
// The img object
console.log(document.getElementById);
// TypeError: document.getElementById is not a function :D
console.log(document.getElementById('asdf'));
</script>
I tried poking around for security vulnerabilities with this but couldn't find any :( ntfy done sleep 10
If you want to also capture output, you can just use a simple bash function: ntfy_done_output() {
local TEMP_FILE="$(mktemp)" SUCCESS LOG
"${@}" 2>&1 | tee "${TEMP_FILE}"
SUCCESS="$((!PIPESTATUS[0]))"
LOG="$(curl -fLX POST -T- <"${TEMP_FILE}" some-pastebin.example.com)"
if ((SUCCESS)); then
ntfy send "Success! Log: ${LOG}"
else
ntfy send "Failed :(. Log: ${LOG}"
fi
}
I also want sunrise/sunset time, random number generator, and hourly beep+30m beep like a ships clock