Skip to content

Instantly share code, notes, and snippets.

@sigmunau
sigmunau / example-site.conf
Last active Jan 17, 2017
Example site configuration using apache mod_auth_openidc and dataporten
View example-site.conf
<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
View gist:9147653
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
View match_ip_address.py
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")
View _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
)
You can’t perform that action at this time.