Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am unixsage on github.
  • I am unixsage (https://keybase.io/unixsage) on keybase.
  • I have a public key whose fingerprint is 8ED3 5054 68A8 86AF 537B AD5B 2CFD B395 BE67 3984

To claim this, I am signing this object:

@UnixSage
UnixSage / haproxy.cfg
Last active March 17, 2018 14:20
Using haproxy as a shim between a SSLv3 Interface and a modern browser
global
daemon
maxconn 1028
tune.ssl.default-dh-param 1024
user haproxy
group haproxy
log 127.0.0.1 local0
defaults
timeout connect 5000ms
@UnixSage
UnixSage / mod-ead-calc.pl
Last active March 17, 2018 14:35
Generate EAD (Equivalent Air Depth) tables For SCUBA Diving
#!/bin/perl
# mod-ead-calc
# By: John C. Place
# http://www.unixsage.com
print "<title>Maximim Operating Depth and Eqivlant Air Depth Table</title>\n";
print "<table border cellpadding=\"3\">\n";
print "<caption>Maximim Operating Depth and Eqivlant Air Depth Table (fsw)</caption>";
for($x=20; $x <= 100; $x+=2) {
@UnixSage
UnixSage / rock-bottom-calc.pl
Last active March 17, 2018 14:53
Rock Bottom Table Generator
#!/usr/bin/perl
# mod-ead-calc
# By: John C. Place
# http://www.unixsage.com
print <<EOT
Assumptions:
<ul>
<li>Stressed diver SAC rate 1cf/min
<li>1 min to sort out problem at depth
@UnixSage
UnixSage / CertBotGoDaddyAuthHook.sh
Last active May 20, 2023 14:27
Script to use with CertBot's --manual-auth-hook switch
#!/bin/bash
KEY="GoDaddyAuthKey"
SECRET="GoDaddySecret"
APISITE="api.godaddy.com"
BASEDOMAIN=`echo ${CERTBOT_DOMAIN} | awk -F. '{OFS="."; print $(NF-1),$(NF)}'`
SUBDOMAIN=`echo ${CERTBOT_DOMAIN} | sed -e 's/'${BASEDOMAIN}'//' -e 's/\.$//'`
@UnixSage
UnixSage / 6to4haproxy.cfg
Last active September 21, 2018 13:07
IPv6 to IPv4 Proxy
frontend localnodes
bind :::443 v4v6
mode tcp
default_backend nodes
timeout client 1m
backend nodes
mode tcp
balance roundrobin
server W.X.Y.Z:443
@UnixSage
UnixSage / MemorablePassword.py
Last active December 31, 2019 15:24
Generate random word password that are "Datacenter Compatable" meaning realistically typable into a console.
#!/usr/bin/env python3
from random import choice,shuffle
import string
password=[]
words=[]
shortwords=[]
wordfile=open("/usr/share/dict/words")
@UnixSage
UnixSage / genpass.py
Last active June 30, 2024 16:14
SysAdmin Password Tool
#!/usr/bin/env python3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@UnixSage
UnixSage / DataDogExtract.py
Last active September 12, 2019 15:24
Get a filtered Hostlist and Tags from DataDog
#!/usr/bin/env python3
import json
import requests
import os,sys,time,getopt
import configparser
helpinfo="""
Usage:
-s IncludeList
@UnixSage
UnixSage / MonitorIP.py
Last active July 5, 2020 17:39
Simple script that will monitor a list of names and make sure the IPs match. Useful if you not using CNAMES for APEX domains. Output can be put on a web server and monitored for status.
#!/usr/bin/env python3
import socket
import datetime
domainlist = {
'home.mydomain.com': 'user.myisp.net',
'mydomain.com': 'account.myhosting.com'
}