Skip to content

Instantly share code, notes, and snippets.

View ajtrichards's full-sized avatar
🏠
Working from home

Alex Richards ajtrichards

🏠
Working from home
  • South Wales
View GitHub Profile
@ajtrichards
ajtrichards / github-cleanup-workflows.sh
Created July 24, 2024 06:16
GitHub - Cleanup GitHub Actions Workflow's that are no longer in use or were used for testing
run_ids=$(gh run list --limit 500 --repo=name/name --workflow=name.yml --json databaseId | jq -r '.[].databaseId')
for run_id in $run_ids; do
gh run delete $run_id --repo name/name
done
@ajtrichards
ajtrichards / slack-set-user-status.sh
Created February 13, 2025 11:57
Set's a users status in Slack.
curl -X POST "https://slack.com/api/users.profile.set" \
-H "Authorization: Bearer xoxp-USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user": "USER_ID",
"profile": {
"status_text": "Off Sick",
"status_emoji": ":face_with_thermometer:",
"status_expiration": 0
}