Paul's Programming Notes     Archive     Feed     Github

Could not initialize NMClient

** (process:17986): WARNING **: error: could not connect to NetworkManager

Fix: Try running with sudo.

For example: sudo nm-tool | grep DNS

Crontab Mistake

I wanted to run a script every 20 minutes, so I put this into my crontab:
20 * * * * sh

That's wrong. That only runs it once every hour 20 minutes into the hour. For example, "20,40 * * * * sh" would run it twice - 20 and 40 minutes into the hour.

To run the script every 20 minutes like I was expecting:
*/20 * * * * sh

PHP Best Practices

Things I learned:

  • It's easy to install PHP-APC for quick opcode caching, and it apparently serves the same purpose as memcached for a single server.
  • Memcache and Memcached are two different libraries.
  • There's a different (a small one) in speed between single and double quotes.
  • Use phpass to store passwords.

Set Up Wordpress For FTP

If it's asking you for FTP login information when you try to update wordpress or a plugin, you don't need to do that! Chances are you don't have permissions correctly configured on that directory. Make sure apache owns the directory. On ubuntu, this will probably work (depending on which user owns apache):

sudo chown -R www-data:www-data /var/www

Bootstrap Span Is Overlapping

Try setting a static width on the span. This ensures responsive knows when to put it on another line. It solved my issues with the spans overlapping.

example: add style="width: 520px" to your div with class="span6"

mysql-client 5.6 or phpmyadmin for mysql 5.6

Mysql-client 5.6 doesn't seem to exist, and you don't need it. Phpmyadmin installs mysql-client 5.5 automatically, and that works with mysql server 5.6. If you're having issues, you probably need to run "sudo dpkg-reconfigure phpmyadmin".