Skip to content

Instantly share code, notes, and snippets.

View christopwner's full-sized avatar

Christopher Towner christopwner

View GitHub Profile
#!/bin/bash
#script for checking availability of amd's rx 6900 xt graphics card
page='https://www.amd.com/en/direct-buy/5458372200/us'
agent='User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0'
result=$(curl -H "${agent}" -H 'Cache-Control: no-cache' -s "${page}")
pattern='out of stock'
if ! grep -qie "${pattern}" <<< $result; then
XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send \