Skip to content

Instantly share code, notes, and snippets.

@sigmunau
sigmunau / example-site.conf
Last active January 17, 2017 08:52
Example site configuration using apache mod_auth_openidc and dataporten
<VirtualHost www.example.org>
ServerAdmin webmaster@example.org
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# OpenID Connect metadata for dataporten.
OIDCProviderMetadataURL https://auth.dataporten.no/.well-known/openid-configuration
OIDCSSLValidateServer On
def match_ip_address(cert, ip_address):
"""Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *ip_address*. According to RFC 6125
section 3.1.3.2.
CertificateError is raised on failure. On success, the function
returns nothing.
"""
if not cert:
raise ValueError("empty or no certificate")
@sigmunau
sigmunau / _gem
Last active December 18, 2015 18:09 — forked from alexvollmer/_gem
#compdef gem gem1.9
gem_general_flags=("(-h --help)"{-h,--help}"[Get help on this command]"
"(-V --verbose)"{-V,--verbose}"[Set the verbose level of output]"
"(-q --quiet)"{-q,--quiet}"[Silence commands]"
"--config-file[Use this config file instead of default]:file:_files"
"--backtrace[Show stack backtrace on errors]"
"--debug[Turn on Ruby debugging]"
$nul_arg
)
1.12.2
fab -H 158.38.213.171 -- uname -r > /dev/null 2> /dev/null 7,19s user 0,01s system 96% cpu 7,482 total
1.12.1
fab -H 158.38.213.171 -- uname -r > /dev/null 2> /dev/null 7,24s user 0,01s system 96% cpu 7,529 total
1.12.0
fab -H 158.38.213.171 -- uname -r > /dev/null 2> /dev/null 7,21s user 0,02s system 96% cpu 7,506 total
1.11.4
fab -H 158.38.213.171 -- uname -r > /dev/null 2> /dev/null 1,17s user 0,02s system 82% cpu 1,440 total
1.11.3
fab -H 158.38.213.171 -- uname -r > /dev/null 2> /dev/null 1,16s user 0,02s system 80% cpu 1,468 total