How To: Root/Unroot Xiaomi Mi4i (Stock and Developer MIUI 6 ROM)

Note: I write this post so that I have a reference point in the future should the need arise. Mostly due to the fact that there are a lot of information about doing it, but scattered everywhere.

Disclaimer: I am nowhere near an expert when it comes to flashing or rooting Android devices. However, in the spirit of sharing, I am documenting my process in this post. Continue reading How To: Root/Unroot Xiaomi Mi4i (Stock and Developer MIUI 6 ROM)

Bootstrap 3: Handling Modal within Modal

If you’re working on a web application built using bootstrap as it’s core framework, you might come across instances where there will be a need to have a modal window that is opened within another modal window. Even though this is not really a good UX practise, there are instances where it is unavoidable.

Opening a modal within a modal is technically supported with just the bare Bootstrap code, but take note of this caveat:

Overlapping modals not supported
Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

Continue reading Bootstrap 3: Handling Modal within Modal

Renewing Lapsed Motorcycle Road Tax Experience

Following on my post about how to renew lapsed motorcycle road tax, I finally managed to get it done. However, my experience is not exactly smooth, due to one overlook and some unexpected turn of events.

What is this ‘lapsed motorcycle road tax’?

Basically, once your road tax expires, you have a grace period of one year from the road tax’s expiry date to renew your road tax. Once you go over this period, you will have to have your vehicle inspected before you can renew your road tax again.

Continue reading Renewing Lapsed Motorcycle Road Tax Experience

Note to self: “env: python\r: No such file or directory” error

On one of the Python project we are handling at work, it always spit up this error when we try to directly run the .py file:

$ ./manage.py runserver
env: python\r: No such file or directory

At first I thought it was that my PATH is botched up. But the other Python apps are running perfectly fine.

Continue reading Note to self: “env: python\r: No such file or directory” error

Note to self: How to create new database and user in MySQL

Note: These ‘Note to self‘ series of posts are mainly for me to remember stuffs that I always forget. It might be handy to some, however.

Okay Ross, here’s how you create MySQL user and assign him/her to a specific database.

$ mysql -uroot -p
 
mysql> CREATE DATABASE 'DATABASE_NAME';
mysql> GRANT usage ON *.* TO 'USER_NAME'@'HOSTNAME' IDENTIFIED BY 'USER_PASSWORD';
mysql> GRANT ALL privileges ON 'DATABASE_NAME'.* TO 'USER_NAME'@'HOSTNAME';
mysql> FLUSH privileges;