Skip to content

Instantly share code, notes, and snippets.

View dlbewley's full-sized avatar
📺

Dale Bewley dlbewley

📺
View GitHub Profile
@dlbewley
dlbewley / setLogLevel.py
Created May 24, 2015 00:38
python setLogLevel function to setup logging; with OS X detection
import os
import platform
import logging, logging.handlers
def setLogLevel(loglevel='debug'):
numeric_loglevel = getattr(logging, loglevel.upper(), None)
if not isinstance(numeric_loglevel, int):
raise ValueError('Invalid log level: "%s"\n Try: "debug", "info", "warning", "critical".' % loglevel)
logging.basicConfig(level=numeric_loglevel, format='%(asctime)s %(name)s %(levelname)s %(message)s')
@dlbewley
dlbewley / gist:a062df2612fb1e4b7e5f
Last active October 4, 2015 18:32
Update github fork with upstream changes in original repo

How do I get changes from Sean's sweet repo?

git remote add upstream [email protected]:SeanPlusPlus/WebDevTemplates.git
git fetch upstream
git checkout master
git merge upstream/master

Beware of conflicts

@dlbewley
dlbewley / gist:11123974
Created April 20, 2014 20:09
Verifying myself: I am dlbewley on Keybase.io.
### Keybase proof
I hereby claim:
* I am dlbewley on github.
* I am dlbewley (https://keybase.io/dlbewley) on keybase.
* I have a public key whose fingerprint is A67C CD3E 836F E306 4F0B C3AB E38F 6DE5 99A0 CA6A
To claim this, I am signing this object: