Skip to content

Instantly share code, notes, and snippets.

View dipack95's full-sized avatar
:shipit:

Dipack dipack95

:shipit:
View GitHub Profile
import argparse
import random
import re
import time
from datetime import datetime, timedelta
from prometheus_client import generate_latest, start_http_server, Gauge
COMMENT_RE = r"^\s*\#.*$"
# LETTER = random.choice(string.ascii_letters)
@dipack95
dipack95 / send-diag-info.sh
Created February 22, 2017 17:18
Simple Sendemail script
logFile="email_$(date --iso-8601).log"
subject="Status - RPi Alpha - $(date --iso-8601)"
rpiAddress=""
rpiAddressPass=""
from="$rpiAddress"
to=""
smtpServer="smtp.gmail.com:587"
outputFile="info.log"
echo "Info for $(date --iso-8601)" > $outputFile
#!/bin/bash
echo "Getting 64 bit setup from Cygwin source." && wget -N https://cygwin.com/setup-x86_64.exe && chmod +x setup-x86_64.exe && echo "Upgrading all packages." && ./setup-x86_64.exe -nqg
:: Meant to be used along with Cygwin, on Windows.
:: Place this in '.bat' file, and drop it in the 'Startup' folder on Windows to get this to run at startup.
bash --login -c "curl -s \"http://ipv6-test.com/api/myip.php\" | email -s \"External IP Address\" email_address@email.com"