WP-Config Disable Cron

define(‘DISABLE_WP_CRON’, true); //Disable page load cron

WordPress › Support » How to disable wp_cron via page loads and run it manually instead?.

Posted in Development, PHP, Web Development & Administration, Wordpress | Tagged , , , , , | Leave a comment

Marc Ghorayeb • MongoDB schema definitions in Li3

Marc Ghorayeb • MongoDB schema definitions in Li3.

Adding Tags to lithium blog.  I found how to use list items / nested strings
in lithium using mongo.

More useful resources include: http://blog.raymondjulin.com/2011/01/06/list-of-useful-lithium-li3-resources/

http://cogfactory.net/2010/12/10/lithium-framework-blog-tutorial-extended-mongodb/

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Lithium Error lithium\action\DispatchException (Code #404)

Error lithium\action\DispatchException (Code #404)

 

If you’re experiencing this issue, navigate to your current lithium project’s folder and run: li3 test /

 

Posted in Uncategorized | Tagged , , , , | Leave a comment

Ubuntu 10.04 Linux Commands Cheat Sheet

Unzip:

  • sudo apt-get install unzip
  • unzip [file]

Tar:

  • tar -cvvf foo.tar [directory]

Untar:

  • tar -zxvf yourfile.tar
  • tar -xvfz filename.tar.gz
  • tar -xvzf filename.tar.gz [directory]
  • tar -jxvf filename.tar.bz2

Find: find [dir] -type d|f -iname ‘searchstring’

  • find / -type -d -iname ‘python’
  • find ~ -type d -exec chmod +x {} \;

Delete a user account

  • sudo deluser <username>

Add an New user

  • sudo useradd <username>

or

  • sudo useradd -d /home/<directory> -m <username>

( -d specifies home directory, -m makes the folder if it doesn’t exist )

useradd doesn’t add password unless you add -p     …. or you can just set the password later with:

  • sudo passwd <username>

If called with two non-option arguments (see below), adduser will add an existing user to an existing group.

Add an existing user to an existing group

  • sudo usermod -a -G <group> <user>

Set password of new user

  • sudo passwd <username>

Make a new Group: 

  • groupadd <groupname>

To see what groups currently exist:

  • cat /etc/group

To see current users logged in:

  • w

Count lines in file:

  • wc -l <filename>

 

Posted in Uncategorized | Tagged , , , , , , , , , , , , | Leave a comment

Installing Python MySQLDB on Windows Errors

Well after trying to recompile the entire library, i came across this link.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

A plethora of precompile python libraries.  What a great resource.

Up until i found the precompiled libraries i came across a plethora of errors trying to compile MySQLdb.  Errors I’ve gotten:

File setup_windows.py line 7, in get_config serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])

error: Unable to find vcvarsall.bat

 

Hope this helps you as much as it did me.

Posted in Python | Tagged , , , | Leave a comment