Skip to content

Instantly share code, notes, and snippets.

View lrowe's full-sized avatar

Laurence Rowe lrowe

  • San Francisco, CA
View GitHub Profile
import gc
closed = False
def generator(iterable, held=None):
global closed
try:
for chunk in iterable:
yield chunk
except GeneratorExit:
@lrowe
lrowe / example.py
Last active August 29, 2015 14:24 — forked from sigmavirus24/example.py
import gc
closed = False
def generator(iterable):
global closed
try:
for chunk in iterable:
yield chunk
except GeneratorExit:
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"