This is a quick howto on generating SSL certs via EFF's CertBot using DNS authentication.
This works for domain and wildcard certs.
For security reasons, certbot is run on a local machine.
Wait, Security?
[model] | |
name = Page | |
label = {{ this.title }} | |
[fields.title] | |
label = Title | |
type = string | |
[fields.meta_title] | |
label = MetaData Title |
# -*- coding: utf-8 -*- | |
""" | |
this translates unicode codepoints in the input into *NAMED* html entities | |
a future version may do the html spec supported entities as well | |
this does not escape unsafe html into entities, as lots of libraries do that and | |
this function is likely to be used in a pipeline that does that too. | |
this simply standardizes unicode points into html entities. | |
""" |
# -*- coding: utf-8 -*- | |
""" | |
this translates unicode codepoints in the input into *NAMED* html entities | |
a future version may do the html spec supported entities as well | |
this does not escape unsafe html into entities, as lots of libraries do that and | |
this function is likely to be used in a pipeline that does that too. | |
this simply standardizes unicode points into html entities. | |
""" |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# | |
# Use this file to build your own SSCCE | |
# SSCCE = Short, Self Contained, Correct (Compatible) Example | |
# see http://sscce.org/ | |
# | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
if True: | |
print("===> installing import_logger_orverride") | |
import os | |
import psutil | |
import pdb | |
import pprint | |
import __builtin__ | |
import logging | |
import sys |
if True: | |
print("===> installing import_logger_orverride") | |
import os | |
import psutil | |
import pdb | |
import pprint | |
import __builtin__ | |
import logging | |
import sys |
""" | |
After a bit of thought, I rewrote our response caching. | |
I stripped it into this gist in case anyone needs a starting point in the future. it's still rather specialized and hacky... but a bit cleaner than the earlier approach | |
The general overiew is this: | |
* We needed to cache responses AND perform some light operations. 99% of a rendered page is cachable as-is. | |
* We wanted to consolidate where the configuration is, perferalbly with the route_name declaration - but in this case it was better off with the caching code. | |
* The cached output should be rendered, which mades the `decorators` egress perfect... however some setup code happens in the __init__ phase of view-based classes and the 'decorators' ingress happens too soon. |
@task | |
def get_ExpensiveCalculator_foo(): | |
expensive_foo = app_shared.ExpensiveCalculator().expensive_foo() | |
app_pyramid.CheapCalculator().set_foo(expensive_foo) |
@task | |
def get_ExpensiveCalculator_foo(): | |
expensive_foo = app_shared.ExpensiveCalculator().expensive_foo() | |
app_pyramid.CheapCalculator().set_foo(expensive_foo) |