Skip to content

Instantly share code, notes, and snippets.

View helloimalemur's full-sized avatar
🦊

helloimalemur helloimalemur

🦊
View GitHub Profile
@helloimalemur
helloimalemur / discord_notif.sh
Created November 13, 2022 19:41
Bash Discord Notification
#!/bin/bash
## first parameter is message
## second parameter is url
WEBHOOK_URL=$2
JSON="{\"content\": \"$1\"}"
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL"
@helloimalemur
helloimalemur / example.service
Created September 8, 2022 22:53
example systemd .service file
[Unit]
Description=example
After=network.target
StartLimitInterval=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=myq
@helloimalemur
helloimalemur / server.py
Created September 8, 2022 19:22 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):