Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
DOMAINS=""
while read d; do
DOMAINS="$DOMAINS -d $d"
done < /etc/letsencrypt/domains
letsencrypt certonly \
-n --agree-tos --email donald@stufft.io --webroot -w /var/www/letsencrypt \
[package]
name = "Pyramid"
[package.build-system]
tool = "whatever"
requires = ["setuptools", "wheel"]
[package.test-system]
command = "py.test"
requires = ["pytest", "pytest-timeout"]
[package]
name = "Django"
# version = ... # This is omitted, ``setup.py`` must be executed to read it.
summary = """
A high-level Python Web framework that encourages rapid development and\
clean, pragmatic design.\
"""
url = "http://www.djangoproject.com/"
author = "Django Software Foundation"
author-email = "foundation@djangoproject.com"
def pytest_addoption(parser):
parser.addoption(
"--backend", action="store", metavar="NAME",
help="Only run tests matching the backend NAME."
)
SELECT
details.system.name,
details.system.release,
COUNT(*) AS downloads,
FROM
TABLE_DATE_RANGE( [long-stack-762:pypi.downloads], TIMESTAMP("20160114"), CURRENT_TIMESTAMP() )
WHERE
details.system.name = 'linux'
GROUP BY
details.system.name,
SELECT
details.distro.name,
details.distro.version,
COUNT(*) AS downloads,
FROM
TABLE_DATE_RANGE( [long-stack-762:pypi.downloads], TIMESTAMP("20160114"), CURRENT_TIMESTAMP() )
WHERE
details.distro.name IS NOT NULL
GROUP BY
details.distro.name,
SELECT
COUNT(*) AS downloads,
file.project
FROM
TABLE_DATE_RANGE( [long-stack-762:pypi.downloads], TIMESTAMP("20160114"), CURRENT_TIMESTAMP() )
WHERE
file.type = 'bdist_wheel'
AND NOT REGEXP_MATCH(file.filename, '^.*-none-any.whl$')
GROUP BY
file.project
SELECT
COUNT(*) AS downloads,
file.filename
FROM
TABLE_DATE_RANGE( [long-stack-762:pypi.downloads], TIMESTAMP("20160114"), CURRENT_TIMESTAMP() )
WHERE
file.type = 'bdist_wheel'
AND NOT REGEXP_MATCH(file.filename, '^.*-none-any.whl$')
GROUP BY
file.filename
@dstufft
dstufft / path.py
Last active August 29, 2015 14:16
# /usr/bin/python
[
'',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', # Extras
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
$ openssl verify -CAfile working-bundle.pem -purpose sslserver -issuer_checks -untrusted chain.pem chain.pem
chain.pem: O = identity.api.rackspacecloud.com, OU = Go to https://www.thawte.com/repository/index.html, OU = Thawte SSL123 certificate, OU = Domain Validated, CN = identity.api.rackspacecloud.com
error 29 at 0 depth lookup:subject issuer mismatch
C = US, O = "Thawte, Inc.", OU = Domain Validated SSL, CN = Thawte DV SSL CA
error 29 at 0 depth lookup:subject issuer mismatch
C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA
error 29 at 0 depth lookup:subject issuer mismatch
OK
$ openssl verify -CAfile broken-bundle.pem -purpose sslserver -issuer_checks -untrusted chain.pem chain.pem