Skip to content

Instantly share code, notes, and snippets.

@mihow
mihow / logging_example.py
Last active January 24, 2017 19:44
Basic logging configuration in Python
import logging
logging.basicConfig(format='%(levelname)s:%(message)s')
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
def main():
log.info("Great info")
log.debug("You won't see this")
@mihow
mihow / _webfaction_setup.rst
Created April 26, 2011 00:21 — forked from ptone/_webfaction_setup.rst
setting up a stack on webfaction

Setting up Webfaction for modern Django deployment

last updated: 4/5/2011

note that this stuff is always a moving target, much of this has been cribbed and combined from various blog posts. Much of the information was out of date from those, and if it is more than a couple months after the last updated date above, consider some of this likely to now be out of date.

@mihow
mihow / nginx-1.0.0-installer.py
Created April 23, 2011 01:04 — forked from robflaherty/nginx-0765-installer.txt
Nginx 1.0.0 installer for Webfaction
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/bin/env python2.6
VERSION = "1.0.0"
"""
Nginx Installer
"autostart": not applicable
"extra info": Enter domain name for the nginx app
@mihow
mihow / gist:d65c62d9b32613033ad5
Last active September 8, 2015 05:03 — forked from darkopetrovic/gist:11292725
Datalog and stream light sensor and voltage reading from ADC with Raspberry PI to Plot.ly
#!/usr/bin/python
import os, time, signal, sys
from Adafruit_ADS1x15 import ADS1x15
import RPi.GPIO as GPIO
from datetime import datetime
import subprocess
import argparse
import requests
import json