This file contains hidden or 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 | |
| # Get protocol, ports and interval from CLI | |
| PROTOCOL=$1 | |
| PORTS=$2 | |
| INTERVAL=$3 | |
| if [ -z "$PROTOCOL" ] || [ -z "$PORTS" ] || [ -z "$INTERVAL" ]; then | |
| echo "Usage: $0 <PROTOCOL> <PORTS> <INTERVAL>" | |
| echo "PROTOCOL can be:" |
This file contains hidden or 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 | |
| # Redis connecting string, interval, command to monitor from CLI | |
| REDIS_CONN=$1 | |
| INTERVAL=$2 | |
| COMMAND=$3 | |
| if [ -z "$REDIS_CONN" ] || [ -z "$INTERVAL" ]; then | |
| echo "Usage: $0 <REDIS_COMMAND> <INTERVAL> <COMMAND_TO_MONITOR>" | |
| echo "Example: $0 'redis-cli -h localhost -p 6379' 10 publish" |
This file contains hidden or 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
| (function() { | |
| var a = String; | |
| var b = a.fromCharCode; | |
| var c = [ | |
| 55, 114, 117, 51, | |
| 95, 119, 52, 114, | |
| 114, 49, 48, 114 | |
| ]; | |
| var d = ""; | |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>The Loud House GIF</title> | |
| <script> | |
| var encodedURL = "aHR0cHM6Ly9tZWRpYS5naXBoeS5jb20vbWVkaWEvZDNNSlo4R0pTRm9mdEQ4SS9naXBoeS5naWY="; | |
This file contains hidden or 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
| from win10toast import ToastNotifier | |
| from ping3 import ping | |
| import time | |
| import os | |
| #Defining variables | |
| device_ip_address = "192.168.0.101" #IP address of the device to be pinged | |
| notification_delay = 120.0 #Frequency of the offline notification in seconds | |
| loop_delay = 1.0 #Frequency of device status chekcing in seconds | |
| was_offline = False |
This file contains hidden or 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
| import RPi.GPIO as GPIO | |
| import time | |
| import urllib.request | |
| #Defining variables | |
| buzzer_pin = 23 | |
| def setup(): | |
| GPIO.setmode(GPIO.BCM) | |
This file contains hidden or 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
| import firebase_admin | |
| from firebase_admin import credentials | |
| from firebase_admin import firestore | |
| import csv | |
| #Initializing firebase | |
| cred = credentials.Certificate("path/to/serviceAccount.json") | |
| firebase_admin.initialize_app(cred) | |
| db = firestore.client() |