Archive for 20 November 2014

Python + peewee and OperationalError ‘MySQL server has gone away’

It took hours to figure out why my python script using peewee yielded OperationalError(2006, ‘MySQL server has gone away’), but I found the problem. This error is very misleading and also results when MySQL responds with a Packet Too Large response on an INSERT statement. In my case, I’m inserting a very large 15-20 MB [...]

Configuring Eclipse for IntelliJ users

There are a few things I’ve gotten used to in IntelliJ that require some customizations in Eclipse. The following steps will make Eclipse feel more familiar and ease the transition. Key Bindings You can get close to IntelliJ’s key bindings by installing the ideakeyscheme plugin. Place the downloaded JAR in eclipse/dropins and unzip it into [...]

MacOS Application Installation List

This is a list of applications I find useful on a Mac. KeePassX Chrome Firefox iTerm Flux: I use 3000K for the sunset setting. smcFanControl Degrees Sublime Text PyCharm FileZilla Android File Transfer LibreOffice Google Drive JDK 7 JDK 8 Maven Git Homebrew IntelliJ PyCharm Xcode Also developer command-line tools via xcode-select –install Chmox VirtualBox

Sublime Text Key Mappings for MacOS

This is my Sublime Text custom key configuration on MacOS, which makes it a bit more consistent with other text editors. Open Preferences > Key Bindings – User and paste the following. [ // Reference: // {"keys": ["end"], “command”: “move_to”, “args”: {“to”: “eol”}}, {“keys”: ["home"], “command”: “move_to”, “args”: {“to”: “bol”}}, {“keys”: ["super+home"], “command”: “move_to”, [...]

IntelliJ Keymap Customizations on MacOS

A few useful IntelliJ customizations on MacOS. Tab Navigation Some of the tab navigation would be better if it’s consistent with other text editors on MacOS. Go to: Project Settings > Keymap > Main menu > Window > Editor Tabs Under this list, add the following keyboard shortcuts. The existing shortcuts should also be kept. [...]

Configuring Python on MacOS

This post goes through the steps to add the necessary modules in Python that I use. Install pip $ sudo easy_install pip Set up MySQL prerequisites to install the Python MySQLdb module mysql_config must be on the path in order to install the MySQL-python module. I install MySQL in /usr/local and then create a symlink [...]