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
#!/bin/bash | |
usage() { | |
echo "Usage: $0 {start|stop|restart}" | |
} | |
start() { | |
echo "Starting GlobalProtect..." | |
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist | |
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist |
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
""" | |
Quick-and-dirty scraper that checks for the availability of a product in the Unifi store | |
Checks the link in the TARGET_URL variable every 30 seconds and calls the webhook in WEBHOOK_URL if the product | |
is available. | |
Requirements: | |
beautifulsoup4==4.10.0 | |
requests==2.26.0 | |
requests_html==0.10.0 |
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
#!/bin/zsh | |
# Fill in your webhook here | |
WEBHOOK=https://httpbin.org/get | |
STORE_URL=https://eu.store.ui.com | |
while true; do | |
AVAILABLE=$(curl --silent ${STORE_URL}/products.json | jq '.products[] | select(.handle=="dream-router-ea").variants[0].available') | |
if [[ "${AVAILABLE}" == "true" ]]; then |