Skip to content

Instantly share code, notes, and snippets.

View Jocadbz's full-sized avatar
😵‍💫
Coding

Joca Jocadbz

😵‍💫
Coding
View GitHub Profile
@Jocadbz
Jocadbz / .bashrc
Created December 7, 2025 22:43
Little bash function to start a command and notify you on discord when it is finished through a webhook.
discord_notify() {
local WEBHOOK="YOUR_WEBHOOK_API"
local USER_ID="YOUR_USER_ID"
curl -s -H "Content-Type: application/json" \
-d "{\"content\": \"<@$USER_ID> Started\`\`\`bash\n$*\n\`\`\`\"}" \
"$WEBHOOK" > /dev/null
local START=$(date +%s)
eval "$@"