This has been moved to https://github.com/bitcoin/bips/blob/master/bip-0148.mediawiki
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To send a email, use the 'mailx' command. This takes the email to send on | |
# standard input. The -s flag is used to specify your subject, and the | |
# recipient address is specified without any flags. Everything after '--' is | |
# passed on to the Mail Transport Agent (MTA, the local mailserver), and the | |
# '-f' flag is used to specify the sender address, while '-F' is used to | |
# specify the sender name. | |
# | |
# See 'man 1 mailx' for details. The Debian packages you can use for this are | |
# 'bsd-mailx' or 'heirloom-mailx', though both present slightly different | |
# command line interfaces. I'm using 'bsd-mailx' here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from cgi import escape | |
def index(environ, start_response): | |
""" | |
This function will be mounted on "/" and display a link | |
to the hello world page. | |
""" | |
start_response('200 OK', [('Content-Type', 'text/plain')]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A minimal example of how to use Paste and WebOb to build a custom | |
WSGI app and serve it. | |
Depends on: | |
* paste - http://pypi.python.org/pypi/Paste | |
* webob - http://pypi.python.org/pypi/WebOb/1.1.1 | |
* routes - http://pypi.python.org/pypi/Routes/1.12.3 | |
I (marmida) still think this is less appropriate than using CouchDB; you'll need |