"My attention span is so poor today that my train of thought is now a replacement bus service."
Twitter Bootstrap 4
I was doing some work with Twitter Bootstrap 4 yesterday. It's amazing how many differences there are with Bootstrap 3 - it's changed a lot! All my old knowledge has gone out the window. I quite like it though - it does feel a little simpler.
Debugging
@ashleymcnamara : "Debugging is like being the detective in a crime drama where you are also the murderer."
Python OAuth2 failing with X509 error
I've just spent about 20 minutes trying to authenticate with Twitter using the Python OAuth2 module. I kept on getting an X509 error, specifically:
ssl.SSLError: [Errno 185090050] _ssl.c:343: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
The solution to this is that the cacerts.txt file in the Python installation is only readable to the root user / wheel group. In order to fix that up, first find the cacerts.txt file:
find /Library/Python/ -name cacerts.txt
Then modify the permissions on the file:
sudo chmod 644 /Library/Python//2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/cacerts.txt
Note that the URL endpoints for twitter on the python-oauth2 Github page are currently wrong. To use the "Twitter Three-legged OAuth Example" change http://twitter.com/oauth/request_token to https://api.twitter.com/oauth/request_token, etc.