Skip to content

Instantly share code, notes, and snippets.

@OwenChia
OwenChia / run.py
Created July 20, 2016 12:47
A WSGI HTTP Server
# -*- coding: utf-8 -*-
from wsgiref.simple_server import make_server
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--host', default='127.0.0.1')
parser.add_argument('--port', default=8088)
parser.add_argument('entry_point', type=str, default='wsgi:application')
@OwenChia
OwenChia / Manifest
Created June 11, 2016 08:08
buildapp-1.5.6.ebuild
DIST buildapp-1.5.6.tar.gz 16352 SHA256 d77fb6c151605da660b909af058206f7fe7d9faf972e2c30876d42cb03d6a3ed
@OwenChia
OwenChia / Dockerfile
Last active September 5, 2016 08:01
Python3 Dockerfile
FROM alpine:3.3
MAINTAINER OwenChia <[email protected]>
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories
RUN apk update && apk upgrade \
&& apk add \
build-base \
python3 \
python3-dev \
@OwenChia
OwenChia / create_bootstrap_script.py
Last active November 15, 2015 14:22
Create a bootstrap script for Beehive
import textwrap
import virtualenv
CUSTOM = """
def extend_parser(parser):
parser.add_option(
'--use-proxy',