Skip to content

Instantly share code, notes, and snippets.

Avatar

Twirrim twirrim

View GitHub Profile
View gist:66bfd2b0705f612f9fa8
#!/usr/bin/env python
import socket
import ssl
import datetime
import smtplib
import argparse
import sys
import logging
@twirrim
twirrim / throttle.py
Created Aug 10, 2018
Quick attempt to emit Raspberry Pi throttling state metrics through telegraf
View throttle.py
#!/usr/bin/env python3
import re
import socket
from subprocess import check_output
def eval_position(position, status):
try:
if status[position] == 1:
return 1
View sslcheck.py
import socket
import ssl
import datetime
from multiprocessing.dummy import Pool as ThreadPool
# Tuples containing host and port
CERTS_TO_CHECK = [("host_one", 443),
("host_two", 25)]
@twirrim
twirrim / compression.py
Created Feb 6, 2019
Check compression in use
View compression.py
#!/usr/bin/env python
from multiprocessing.dummy import Pool
from collections import defaultdict
import requests
import logging
def uses_compression(domain):
logging.info(domain)
try:
View iflip.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
flipdict = {
'a': 'ɐ',
'b': 'q',
'c': 'ɔ',
'C': 'Ɔ',
'd': 'p',