Recent Tips (Part 2)
More quick notes that are too small for full posts.
Disable SSL validation in Twisted Agent
1 | from twisted.internet import _sslverify |
https://stackoverflow.com/questions/39704932/disable-ssl-certificate-check-twisted-agents
macOS ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]
Run Install Certificates.command
under Applications/Python 3.6
.
Find which package provides a file on CentOS
yum whatprovides */libGL.so.1
Insert text at the top of QPlainTextEdit
1 | cursor = self.textedit.textCursor() |
Get all non-private attributes from an object
1 | def get_obj_dict(obj): |
MongoDB dotted keys error
Before MongoDB 3.6, field names cannot contain .
. Attempting to insert one raises pymongo writeerror : the dotted field is not valid for storage
. Upgrade to ≥3.6 or rename the key.
https://docs.mongodb.com/manual/reference/limits/#Restrictions-on-Field-Names