Skip to content

Instantly share code, notes, and snippets.

@mckaydavis
mckaydavis / log_exec.py
Created June 23, 2014 21:50
Python non-blocking reading from stdout and stderr of subprocess.popen process using os.pipe and select.select
#!/usr/bin/env python
# File: log_exec.py
# Author: McKay Davis
# Date: Jun 23, 2014
# Non-blocking stdout and stderr read from a
# Popen process
import os
import subprocess
@ianb
ianb / git-sync.sh
Created January 31, 2012 06:34
An attempt at a simple sync command for git
#!/usr/bin/env bash
set -e
if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
echo "usage: git sync [remote-name]"
echo
echo "Sync's the current repository to another remote host, using git,"
echo "but not using this repository."
echo