Skip to content

Instantly share code, notes, and snippets.

View NiFNi's full-sized avatar

Nico Fricke NiFNi

  • Bremen, Germany
View GitHub Profile
@NiFNi
NiFNi / httpPostSplitter.py
Last active July 25, 2018 19:06
Split post requests to multiple http servers.
"""
To run this: python3 httpPostSplitter.py <port>
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import requests
# Hosts to which the post will be forwarded
receiver = [
@NiFNi
NiFNi / check_nano_node.sh
Last active March 17, 2018 12:40
Check if a local nano node with RPC enabled is reachable. If not send an email.
# Before usage make sure to have a working mail setup.
# If you are not sure what that means and you run Ubuntu just run "apt install mailutils" and
# choose following settings (be sure to replace example.com with your domain):
# General type of mail configuration?: Internet Site
# System mail name: example.com
# Root and postmaster mail recipient: username
# Other destinations to accept mail for: $myhostname, example.com, mail.example.com, localhost.example.com, localhost
# Force synchronous updates on mail queue?: No
# Local networks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128