- Source: https://distrowatch.com/
- Author: Christian Heimes
- Created: 2017-09-15
alpine 2.7.8(openssl 1.0.1g)- alpine 3.2.2 (openssl 1.0.2d)
- alpine 3.6.2 (libressl 2.5.4)
| $ mkdir a | |
| $ touch a/__init__.py | |
| $ touch a/b.py | |
| $ python2 | |
| Python 2.7.13 (default, Sep 5 2017, 08:53:59) | |
| [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux2 | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> import a | |
| >>> a |
| # mpypy in Fedora 26 is currently broken, https://bugzilla.redhat.com/show_bug.cgi?id=1479697 | |
| # sudo dnf install -y python3-mypy | |
| python3 -m venv --system-site-packages /tmp/mypy | |
| /tmp/mypy/bin/pip install --upgrade --force mypy | |
| cd /path/to/freeipa | |
| sudo dnf builddep -y --spec ./freeipa.spec.in | |
| ./autogen.sh | |
| make |
| import sys | |
| import types | |
| class cachedproperty(object): | |
| __slots__ = ('fget', 'name', '__doc__') | |
| def __init__(self, fget, doc=None): | |
| self.fget = fget | |
| self.name = fget.__name__ # python < 3.6 |
| $ ipa dnsrecord-add ipa.example. götter --a-rec=192.168.121.250 --a-create-reverse | |
| Record name: götter | |
| A record: 192.168.121.250 | |
| $ host götter.ipa.example | |
| xn--gtter-jua.ipa.example has address 192.168.121.250 | |
| $ host 192.168.121.250 | |
| 250.121.168.192.in-addr.arpa domain name pointer xn--gtter-jua.ipa.example. | |
| $ dig götter.ipa.example |
| Message from syslogd@***** at Mar 31 11:11:20 ... | |
| kernel:mce: [Hardware Error]: CPU 1: Machine Check: 0 Bank 128: 00000000880003c3 | |
| Message from syslogd@***** at Mar 31 11:11:20 ... | |
| kernel:mce: [Hardware Error]: TSC 1a25bc4d0640 | |
| Message from syslogd@***** at Mar 31 11:11:20 ... | |
| kernel:mce: [Hardware Error]: PROCESSOR 0:306c3 TIME 1490951480 SOCKET 0 APIC 1 microcode 20 | |
| Message from syslogd@***** at Mar 31 11:11:20 ... |
| >>> import pprint, socket, ssl | |
| >>> ctx = ssl.create_default_context() | |
| >>> conn = socket.create_connection(('no-subject.badssl.com', 443)) | |
| >>> sconn = ctx.wrap_socket(conn, server_hostname='no-subject.badssl.com') | |
| >>> pprint.pprint(sconn.getpeercert()) | |
| {'OCSP': (u'http://ocsp.comodoca.com',), | |
| 'caIssuers': (u'http://crt.comodoca.com/UbiquiTLSDVRSAServerCA.crt',), | |
| 'issuer': ((('countryName', u'GB'),), | |
| (('stateOrProvinceName', u'Greater Manchester'),), | |
| (('localityName', u'Salford'),), |
| class CipherSuite(IntEnum): | |
| """TLS cipher suites | |
| Source: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml | |
| Ignored: | |
| export ciphers | |
| key agreement: NULL, SRP_SHA, KRB5, PSK, PSK DHE | |
| auth: anon, NULL, PSK, DSS | |
| encryption: NULL, IDEA, ARIA |
| #!/usr/bin/env python3 | |
| from __future__ import print_function | |
| import os | |
| import time | |
| import sys | |
| if sys.version_info.major >= 3: | |
| timer = time.perf_counter | |
| else: | |
| timer = time.time |
| org.wikimedia.ssh-pkcs11-agent.plist -> ~/Library/LaunchAgents | |
| OPENSC_LIBS=/usr/local/Cellar/opensc/0.15.0/lib | |
| ssh-add -s $OPENSC_LIBS/opensc-pkcs11.so |