Wednesday, September 16, 2015

[Linux] Force Remove/Uninstall Broken / Unstable / Half Installed Package

Recently I've install a package from download which was not match to my pc, Raspberry. It says that it was half installed and need to reinstall. But everytime I try to reinstall it was exit with error, Can't fix it.

So here we go, if you got such stuck situation:

Saturday, September 12, 2015

[LINUX] Numlock Auto ON Without Install Or Scripting

To make numlock pad always ON on booting, no need to install such numlockx or writing script bash must execute on startup.

Actually it was built-in on keyboard setting which numlock off as default. weird huh ?

So to turn it on, we just need to edit keyboard configuration file. Here we go :

Monday, September 7, 2015

Python Mysql Connector Manual Configuration And Connection

Mysql Connector class assignment based on documentation always establish connection on class initialization or constructor, even if it looks like a configuration init.
On documentation here stated that
The MySQLConnection constructor initializes the attributes and when at least one argument is passed, it tries to connect to the MySQL server.
Sometimes we don't want auto-connect on class constructor stage, and make another function to establish connection with Exception handling.

Sunday, September 6, 2015

Backup Micro SD Card As An Image File On Ubuntu

Back up Micro SD Card is an important procedure, as we don't know life cycle of them. We can make backup into a File with whatever name you wish. Below is my steps:

  • Insert Micro SD Card into its adaptor and plug to PC
  • Issue Command df -h from Terminal to know its name [see figure below].