Skip to content

Instantly share code, notes, and snippets.

Mark Biggers biggers

Block or report user

Report or block biggers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
biggers /
Last active Jul 30, 2019
Python dictConfig logging example using SyslogHandler - modified from Stackoverflow answer
import logging
import sys
from logging import config
# REF, modified from:
if sys.platform == "darwin":
address = '/var/run/syslog'
facility = 'local1'
biggers /
Created Sep 1, 2017
simple Linux volume mgmt example / recipe(s) - LVM
Various bits, pieces, notes -- on using Linux Volume (Disk) Mgmt,
on various Linux distros
"A Debian Grimoire - LVM: Logical Volume Management, Version 2"
biggers /
Created Aug 14, 2017
How-to use the PyMySQL module for Python3 DB-API, working simple example (need a SQL table created, first)
import pymysql.cursors
import os
from attrdict import AttrDict
import sys
# Test a one-row Insert, Select for Capacity DB
# ... using Py DB-API
# Install:
# pip3 install PyMySQL attrdict
biggers /
Created Aug 10, 2017
async Python3 code using blocking-function
from concurrent.futures import ThreadPoolExecutor, as_completed
import time
import random
def blocking(pid):
""" a non-deterministic "blocking" ? task
biggers /
Last active Jun 30, 2017 — forked from pmuller/
StreamLogger is a context handler which proxies an output stream to python's logging
#!/usr/bin/env python3
# Port of "Fabric streamlogger" to Python3
# Credit (originally):
# pmuller -
import sys
import logging
from io import StringIO
biggers /
Created Jan 18, 2017
Enable wired-interfaces (incl VPN) to be managed by systemd - Ubuntu Linux 16+
# NetworkManager should manage wired interfaces!
# Linux Mint 18.x (Ubuntu 16.04)
# REF: "fixing VPN problem in Ubuntu",
aptitude install etckeeper
git log
nmcli c # NOTE: no wired-interface controlled
emacs -nw /etc/NetworkManager/NetworkManager.conf
biggers /
Created Aug 19, 2016
x11vnc service start-up script
case "$1" in
killall ${VNC_SERVER}
biggers /
Last active Jan 18, 2017
Installing Ansible from 'git source' -- by tagged-release
## better, working "shell-recipe" for installing a tagged
## Ansible release, from Git source
sudo aptitude install python-yaml python-jinja2 python-paramiko
cd ~/git/Python
git clone git:// --recursive
biggers / Makefile.docker
Created Mar 22, 2016
GNU Makefile for docker-compose work
View Makefile.docker
## -*- makefile -*-
##, Mark Biggers
## GNU Makefile for docker-compose build & run of a Python or other Project
## REFs:
biggers / Dockerfile
Last active Mar 8, 2018
docker-compose build attempt for a Pyramid app
View Dockerfile
FROM phusion/baseimage:0.9.18
# ...put your own build instructions here...
RUN apt-get update --no-install-recommends && \
apt-get install -y --no-install-recommends \
You can’t perform that action at this time.