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
biggers / streamlogger.py
Last active Jun 30, 2017 — forked from pmuller/streamlogger.py
StreamLogger is a context handler which proxies an output stream to python's logging
View streamlogger.py
#!/usr/bin/env python3
#
# Port of "Fabric streamlogger" to Python3
# Credit (originally): https://gist.github.com/2376336.git
# pmuller - streamlogger.py
import sys
import logging
from io import StringIO
View fabfile.py
#!/usr/bin/python
# encoding: utf-8
from __future__ import with_statement
import os
import sys
import datetime
from fabric.api import cd, run, prefix, task, env, get, roles
from fabric.colors import yellow, green
from contextlib import contextmanager as _contextmanager
View fabfile.py
from fabric.api import *
from fabric.context_managers import cd
from fabric.operations import local as lrun, sudo
from fabric.contrib.files import sed
from fabric.utils import warn
from local_fabfile import root, prod, lh, SERVER_IP
def virtualenv(command, run_directory=''):
if run_directory == '':
You can’t perform that action at this time.