Skip to content

Instantly share code, notes, and snippets.

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.


Effective Engineer - Notes

What's an Effective Engineer?

@kgaughan
kgaughan / gist:d1498b42156ecb89980f
Created June 15, 2015 10:52
Sending an email from the shell
# 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.
@kgaughan
kgaughan / minimal-wsgi-app.py
Created April 28, 2013 22:44
A minimal WSGI application, with some minimal routing.
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')])
@rene-armida
rene-armida / paste_wsgi_example.py
Created September 26, 2012 07:16
Example Paste/WebOb/Routes WSGI app
'''
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