Change MySQL Password on Ubuntu – dpkg-reconfigure mysql-server-5.1

Update: Fix forgotten MariaDB password on Ubuntu 18.04 and newer. Update: This method does not work on Ubuntu 16.04, and I have not tested it with newer versions either. Forgot MySQL server root password? It’s trivial to change it in … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 2 Comments

Lifecycle Code Example for Android – onCreate(), onPause(), onResume()

In Android lifecycle, methods are automatically called. This simple example toasts a message each time this happens. Create a new project SimpleStuff, package com.botbook.simplestuff. Run your program and see the states change. Press home button to stop the program. Hold … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

Print PDF from Command Line – cups-pdf, lpr -P PDF

After installing cups-pdf, you can print to file with ‘lpr -P PDF’. Install PDF printer $ sudo apt-get -y install cups-pdf List printer names that lpr can understand $ lpstat -p -d printer deadtree is idle.  enabled since 2011-06-22T08:09:05 EEST … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 2 Comments

Fix Android Build Problem with main.out.xml and strings.out.xml

When you edit an Android XML file in Eclipse, build fails and main.out.xml is created. Fix it by disabling XSL transformation build and set to always build the last build. Eclipse: Window: Preferences: Run/Debug: Launching: Launch Operation -> Always Launch … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Comments Off on Fix Android Build Problem with main.out.xml and strings.out.xml

View & Kill – Processes in Linux

Better to kill one bad process than let the whole system crash. Catch the hogs and let your uptimes grow!

Posted in Uncategorized | Tagged , , , | Comments Off on View & Kill – Processes in Linux