Kit Is It

Month

February 2012

3 posts

MySQL notes
sudo mysqld_safe
sudo mysqladmin shutdown
sudo mysql
GRANT ALL ON menagerie.* TO 'user'@'localhost';
\q
mysql
SELECT USER();
CREATE DATABASE menagerie;
USE menagerie;
SELECT DATABASE();
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
SHOW TABLES;
DESCRIBE pet;
  • Secure the MySQL accounts. See 5.3.1. General Security Guidelines
  • See Chapter 10: Data Types
  • Delimiter can be specified in the LOAD DATA statement
  • When writing tab-delimited files with Vim, set noexpandtab
  • Pick up from 3.3.4.6. Working with NULL values
  • Databases are stored in /usr/local/mysql/data
  • User configuration file is ~/.my.cnf

After installing from the Mac OS X PKG Installer, you can use a different data directory for your databases:

Read More →

Feb 15, 2012
#mysql #python
Vim pythoncomplete for Google App Engine

Follow this: appengine & virtualenv

And then in your .vimrc, be sure to have the following lines:

py << EOF
import dev_appserver
dev_appserver.fix_sys_path()
EOF

Vim pythoncomplete relies on successful compilation of modules. If one of your modules has a reference to a Google App Engine package, it fails to compile in the Vim environment because the GAE path hasn’t been added. By using the code snippet above in .vimrc or any file that gets sourced prior to running Vim, you are effectively adding the GAE paths to the Vim environment.

Feb 8, 2012
#python #vim #google-app-engine

January 2012

22 posts

Enabling Werkzeug debugger console → code.google.com
Feb 1, 2012
#python
Next page →
2011 2012
  • January 22
  • February 3
  • March
  • April 1
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2011 2012
  • January
  • February
  • March
  • April 1
  • May
  • June
  • July
  • August
  • September
  • October
  • November 4
  • December 5