Skip to content

Instantly share code, notes, and snippets.

View ashleykleynhans's full-sized avatar
:octocat:

Ashley Kleynhans ashleykleynhans

:octocat:
View GitHub Profile
@ashleykleynhans
ashleykleynhans / box.py
Last active January 2, 2020 08:01
Python script to control Headless VirtualBox VMs
#!/usr/local/bin/python3.8
import argparse
import os
import re
parser = argparse.ArgumentParser(prog='vbox', description='CLI for VirtualBox DevBox.')
parser.add_argument('--box', nargs='?', const='FNB DevBox #3', default='DevBox', help='VM to start, eg: --box "DevBox"')
parser.add_argument('--start', '--on', action='store_true', help='Start')
parser.add_argument('--pause', '-p', action='store_true', help='Pause')
@ashleykleynhans
ashleykleynhans / test_clam.py
Created March 10, 2020 13:52
Python script to test ClamAV TCP
#!/bin/python
import pyclamd
import sys
try:
cd = pyclamd.ClamdNetworkSocket(host='example.com', port=3310, timeout=5)
if cd.ping():
print("ping succesful")
#!/bin/python
import pyclamd
import sys
import time
start = time.time()
try:
if len(sys.argv) != 2:
@ashleykleynhans
ashleykleynhans / monitor_nfs.py
Last active August 13, 2020 17:00
Python script to monitor stale/unmounted NFS mounts and automatically remount them
#!/bin/python
import signal
import os
import subprocess
from scandir import scandir
# Create a new Alarm Exception
class Alarm(Exception):

Keybase proof

I hereby claim:

  • I am ashleykleynhans on github.
  • I am ashleykza (https://keybase.io/ashleykza) on keybase.
  • I have a public key ASDGNzqvzrHg16RpLzJPnpvOFXFcw2xVLX3h0IdCLlNoKAo

To claim this, I am signing this object:

@ashleykleynhans
ashleykleynhans / README.md
Last active September 25, 2024 08:36 — forked from dlage/README.md
Namecheap DNS to zone file