Skip to content

Instantly share code, notes, and snippets.

import requests
import argparse
import socket
# Define a function to send a notification to the Uptime Kuma webhook
def send_webhook_notification(webhook_url, status_code, message):
payload = {"status": status_code, "message": message}
try:
response = requests.post(webhook_url, json=payload)
response.raise_for_status()
@rwxd
rwxd / main.go
Last active January 12, 2024 16:15
Simple http server that counts requests per second and total requests
package main
// simple http server that counts requests per second and total requests
import (
"flag"
"log"
"net/http"
"sync/atomic"
"time"