Skip to content

Instantly share code, notes, and snippets.

View bensoer's full-sized avatar

Ben Soer bensoer

View GitHub Profile
@bensoer
bensoer / popdropnroll.py
Created January 2, 2019 21:53
POP and IMAP for automated message retrieval
import poplib
import ssl
from imaplib import IMAP4_SSL
pop3_server = "server"
pop3_username = "username"
pop3_password = "password"
imap_server = "server"
@bensoer
bensoer / prison-simulator-stats.py
Created November 23, 2018 04:49
Solving the prison simulation problem engineer style. 99.9% is passing
import random
import numpy as np
import matplotlib.pyplot as plt
def algorithm():
not_all_in_room = True
counter = 0
prisoners = []
@bensoer
bensoer / apachetrafficserverfirewall.sh
Last active October 3, 2016 01:11
A template firewall for configuring an Apache Traffic Server
#! /bin/bash
# README ---
# Below is a script for configuring a server hosting as an Apache Traffic Server in Reverse Proxy mode. Note this has only
# been setup as a basic template and may be missing other features desired for your configuration
# PRE-REQUISITS
# - It is recommended that your Apache Traffic Server be already configured. This will make any adjustments needed obvious in
# the script
@bensoer
bensoer / openvpnfirewall.sh
Last active August 26, 2016 02:06
Simple demo script for configuring openvpn firewalls on a TUN setup behind a local LAN router
#! /bin/bash
# README ---
# Below is a demo script for setting up an openvpn server. This is specifically configured for TUN setups and for setups where
# the VPN Server is located behind a router. The script contains additionaly a section for configuring what traffic can pass
# through the VPN and has simple setups so as to allow SSH connections to be made to the VPN server from within the local LAN
# network that the VPN server is being hosted within. Additionaly, routing has been included to allow DNS and DHCP protocols
# through the firewall so that the VPN server can operate within the local LAN.