Paul's Programming Notes     Archive     Feed     Github

Configuring Notepad++ For Python

On the Settings->"Preferences", "Tab Settings" tab, I set "[Default]" at Tab size: 8, uncheck Replace by space; and set "Python" to uncheck Use default value, Tab size: 4, check Replace by space. This causes inserts into a python source to use 4 spaces for indents, and indent with spaces instead of tabs. 
If I end up with any tabs in the source, I use Edit->Blank Operations->TAB to Space to convert them. I also clean up trailing blanks with Edit->Blank Operations->Trim Trailing Space. 
I install and use the pep8 package to verify standard formatting.

Redirecting From Within Helper Functions - Flask

New Machine Setup For Flask Development On Ubuntu

Here are the commands I use when I bring up a new Ubuntu server for flask development:

MySQL Performance LXC Container vs Host

I have a linux virtual container (LXC) and the server hosting the container running the same version of MySQL with the same database.

I tried running some select queries on both of the both the virtual container and host for benchmark purposes. My conclusion? MySQL read performance inside and outside the LXC container is the exactly the same.

WHMCS Cronjob Error

If you get the following error while you try to run the WHMCS cronjob from the command line:
Site error: the file <b>/var/www/accounts/admin/cron.php</b> requires the ionCube PHP Loader to be installed by the website operator. If you are the website operator please use the <a href="">ionCube Loader Wizard</a> to assist with installation.

You need to add your the ioncube zend extension to the CLI php.ini too: /etc/php5/cli/php.ini