see https://stackoverflow.com/questions/31949760
Example on how to print a traceback and ignore low-level calls.
The MIT License (MIT) | |
Copyright (c) 2016 Damien Nozay | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
// http://stackoverflow.com/questions/1149703/how-can-i-convert-a-stack-trace-to-a-string | |
def formatStackTraceString(t: Throwable): String = { | |
s""" | |
| exception: ${t.getClass.getName} | |
| message: ${t.getMessage} | |
| cause: ${t.getCause} | |
| stacktrace: | |
| ${indent(t.getStackTraceString, spaces = 4)} | |
""".stripMargin |
see https://stackoverflow.com/questions/31949760
Example on how to print a traceback and ignore low-level calls.
dn: cn=config | |
changetype: modify | |
add: olcTLSCipherSuite | |
olcTLSCipherSuite: SECURE256:-VERS-SSL3.0 |
#!/usr/bin/env python | |
# simple script to test that email (internal relay) is working. | |
import smtplib | |
import argparse | |
from uuid import uuid4 | |
from email.mime.text import MIMEText | |
def smtp_mail(subject, message, addr_from, addr_to, smtp_host): | |
msg = MIMEText(message.encode('utf-8'), 'plain', 'utf-8') |
install | |
#cmdline | |
text | |
skipx | |
reboot --eject | |
# we're using a VM | |
unsupported_hardware | |
# please remember to change this |
# /etc/ssh/sshd_config | |
# Everything is going to be public-key based. | |
# And we want to lock down the system from unauthorized access. | |
# Use only protocol 2 | |
Protocol 2 | |
# Using public-key, one try is enough. Must present the correct key. | |
MaxAuthTries 1 |
boot2docker down
VBoxManage modifyvm "boot2docker-vm" --natdnsproxy1 on
VBoxManage modifyvm "boot2docker-vm" --natdnshostresolver1 on
boot2docker up
#!/usr/bin/env python | |
import ldap, sys | |
LDAP_SERVER = 'ldaps://ldap.example.com:636' | |
LDAP_BASE = 'dc=example,dc=com' | |
try: | |
conn = ldap.initialize(LDAP_SERVER) | |
except ldap.LDAPError, e: |
Enable memberOf attribute on an openldap server.
Source: https://www.brianshowalter.com/blog/installing-configuring-openldap