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 , , , ,

VirtualBox Virtual Hard Disk Resizing

Ended up without virtual hard disk space on my Windows XP machine. Never thought I’d need more than 10GB. Luckily, starting with VirtualBox version 4.0, you can resize your virtual hard disks with:

vboxmanage modifyhd DiskName.vdi --resize 15000

where DiskName.vdi is your disks name, and the resize value is in megabytes. I have tested this with .vdi disks (default VirtualBox disk format), no idea if it works for other types of disks.

After this, you should extend the partition itself. I guess booting GParted would be the easiest way if you’re running Win XP.

Tagged , , , ,

Mounting USB in VirtualBox VM

Had problems mounting USB on a FreeNAS VM while running some Linux distro? Well, just add yourself to the vboxusers group.

sudo usermod -aG vboxusers <username>
Tagged , ,