Category Archives: Uncategorized

Python Records. Connection Pool

Important Considerations:

  • Setup pool class to sqlalchemy.pool.NullPool when you create database so we don't allow pooling and only one connection is created, and it is correctly deleted when we call close method.
  • Connection needs to be closed at the end of each call. Close it in finally block.

Enabling ClearText Plugin on OSX for TLS Authentication

vi ~/Library/LaunchAgents/environment.plist

<?xml version="2.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.startup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
launchctl setenv LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN 1
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

launchctl load ~/Library/LaunchAgents/environment.plist

Twitter Bootstrap Css Extension

Example - To add bottom padding to the row class of bootstrap.

  1. create a style.css file
  2. add the following code in style.css:
  3. .bottom-buffer { margin-bottom:60px; }
  4. make the div tag with "row" class look like this:
<div class="row bottom-buffer"></div>