Skip to content

Instantly share code, notes, and snippets.

@mwoolweaver
mwoolweaver / .gitignore
Last active May 18, 2019 17:12 — forked from thatalextaylor/1-python-pretty-time-delta.py
print a pretty time delta in Python in days, hours, minutes and seconds
# Byte-compiled / optimized / DLL files / pip / IDE
__pycache__/
*.py[cod]
*$py.class
src/
.idea/
.vscode/
# Config
config.ini
@mwoolweaver
mwoolweaver / disk_usage.py
Created May 15, 2019 01:13
Disk usage statistics with python
import os
from collections import namedtuple
disk_ntuple = namedtuple('partition', 'device mountpoint fstype')
usage_ntuple = namedtuple('usage', 'total used free percent')
PROC_FILESYSTEMS = "/proc/filesystems"
ETC_MTAB = '/etc/mtab'
def get_disk_partitions():
@mwoolweaver
mwoolweaver / I_Need_Help.md
Created May 6, 2019 02:41
How to configure openVPN server and client same host?

I am trying to configure an openvpn client and server to run simultaneously on the same host.

My issue is that once the host is connected to the paid VPN service the external ip of the host changes and I can no longer connect any clients because the external IP changes. I'm sure there are some iptables rules that could be set to make this work but I can not for the life of me figure it out and google seems to fail me on this topic.

As you can see below I have 2 openvpn Servers setup. tun0 is a split tunnel that only transports dns traffic. tun1 is a full tunnel that transports all traffic.

What i'd like to accomplish is to continue using the 2 servers for clients to connect to and then route all their traffic thru a paid vpn service as well as all routing all traffic originating from the host thru the paid vpn as well.

output from ifconfig below:

@mwoolweaver
mwoolweaver / update-google-dyndns.sh
Created April 29, 2019 19:38 — forked from drewchapin/update-google-dyndns.sh
A shell script to update the public IP address of a Google DynDNS hostname. Intended to be used on DD-WRT routers.
#!/bin/sh
HOSTNAME="host.yourdomain.com"
USERNAME="username"
PASSWORD="password"
LOG_FILE="/tmp/ddns/ddns.log"
while true; do

Keybase proof

I hereby claim:

  • I am mwoolweaver on github.
  • I am mwoolweaver (https://keybase.io/mwoolweaver) on keybase.
  • I have a public key ASDyozktfq8L_ZH5UxV5L4yUO9w55jWtuF6MLY6jmmxaNwo

To claim this, I am signing this object:

deb http://4khmeriphone.com/sp/ ./
deb http://apt.dba-technologies.com/beta/ ./
deb http://apt.if0rce.com/ ./
deb http://apt.mootjeuh.com/ ./
deb http://apt.steverolfe.com/ ./
deb http://apt.golddavid.com/ ./
deb http://arcetera.github.io/ ./
deb http://beta-repo.sassoty.com/ ./
deb http://beta.unlimapps.com/ ./
deb http://betarepo.com/fontme/ ./
@mwoolweaver
mwoolweaver / ipsw.decrypt.md
Created June 17, 2016 19:25 — forked from tzmartin/ipsw.decrypt.md
Decrypting ipsw firmware files