“Your profile could not be opened correctly.” when running Chrome(ium)

This happened to me quite a few times so far. It’s a problem with file permissions.
Happens when you close Chrome(ium) while it was doing some syncing, would be my guess.

You can either delete or change the permissions of the “Web Data” folder:

rm -rf ~/.config/google-chrome/Default/Web\ Data
chmod -R 775 ~/.config/google-chrome/Default/Web\ Data

For Chromium users, switch google-chrome to chromium.

Tagged , ,

MySQL database export/import

I always forget these 2, although I use them quite often. Doh!

Out:

mysqldump -u[user] -p[pass] [db] > [file]

and back in:

mysql -u[user] -p[pass] [db] < [file]
Tagged , ,

Games minimizing randomly

I Recently ran into a problem while playing games on my Windows 7 desktop. They started minimizing randomly, in intervals of around 30 minutes. A pain in the ass, considering I didn’t install anything new recently, except installing an SSD (which I was quite sure had nothing to do with it). Tried some stuff (and since it wasn’t working), figured out I do it the good-ol’-way. Disable all startup programs! And it worked, then added back the ones I though need to start with windows.

Open msconfig from the Start menu. You need to enter the whole term in the search box for it to appear.

msconfig

Here are the steps on how to disable all startup programs:

  1. Open the Startup tab
  2. Disable all startup programs
  3. Restart your computer and test
    1. If it worked, start adding back startup programs you think are needed, and test again
    2. If it didn’t, I am not sure what it could be. Maybe malfunctioning hardware.. Or a driver problem.

startup

Tagged , , , , , , , ,

Creating MySQL users and granting permissions

It is a good idea to have separate users for each database, and to limit the hostname.

 

The default syntax:

CREATE USER 'username'@'hostname' IDENTIFIED BY 'password';

e.g.

CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';

The above will create user test, allow it to connect from localhost (connecting to a DB that is on the same machine, and has password test).

 

Now let’s grant all privileges on some database to the above user:

GRANT ALL PRIVILEGES ON database.* TO 'username'@'hostname' WITH GRANT OPTION;

e.g.

GRANT ALL PRIVILEGES ON test.* TO 'test'@'localhost' WITH GRANT OPTION;

The above will grant all privileges on database test to user test when he connects from localhost. You can fine grain the permissions depending on username/hostname.

 

To check the permissions for some username/hostname:

SHOW GRANTS FOR 'username'@'hostname';

 

I recommend the official guide, if you need better understanding of the above.

Tagged , , , , ,

HTC One X (HOX) Android boot.img flashing using fastboot

As you all know, HTC One X (HOX) needs manual boot.img flashing, since we don’t have an S-OFF script yet. Of course, you need unlocked bootloader for any of this. For Linux users, you can install fastboot using:

apt-get install android-tools-fastboot

while on Windows I recommend the Minimal ADB and Fastboot Installer.
To restart the phone into Bootloader, power off your phone, then hold the power and volume down buttons, or you can use adb:

adb reboot bootloader

When you see the Bootloader screen, test it with these commands:

fastboot devices
fastboot oem get_identifier_token

If you can see your device and/or the token, try flashing the boot.img from your ROM with:

fastboot flash boot boot.img

and erase the cache.

fastboot erase cache

P.S. On Ubuntu, since I tested on it, you need to run the commands with sudo.

Tagged , , , ,