image05 image06 image07

Feature Label Area

Featured Articles From CodeRoach

Sunday, August 3, 2014

Tagged under: , , ,

How to add "Copy to" and "Move to" to right-click menu

Copied from http://unlockforus.blogspot.com/2012/09/add-windows-7-and-8-move-to-and-copy-to.html

Windows Registry Entries
If your a registry geek, creating those registry entries are very easy also. Just follow the steps below.

Go to the registry as shown:
HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers

Once your inside the registry folder, create a folder called “Move to” and “Copy To” using your right-click menu function at any vacant space of the Registry editor (New > Key).





When you’re done creating the folder “Move To” and “Copy To”, Click any of the folder and locate the (default) string. Double-Click any of them and enter the following Value Data:

Move To

(default) = {C2FBB631-2971-11D1-A18C-00C04FD75D13}






Copy To

(default) = {C2FBB630-2971-11D1-A18C-00C04FD75D13}




You can try now the file function by using them both at your Windows explorer.

Copied from http://unlockforus.blogspot.com/2012/09/add-windows-7-and-8-move-to-and-copy-to.html

Thursday, July 31, 2014

Tagged under: , , ,

How to set mouse speed in Ubuntu programmatically


















This article is copied from http://techtots.blogspot.com/2012/03/controlling-mouse-speed-in-ubuntu-when.html

My laptop comes with a Targus cordless mouse which moves too fast even when both Accelleration and Sensitivity in Pointer Speed settings is set to the lowest in Ubuntu.

There's another method to control input speed via the xinput command.

To begin, execute "xinput list" to obtain the list of inputs available:

mike@myhost:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SONiX Targus Soft-Touch Cordless Mouse id=8 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Dell Dell USB Entry Keyboard id=9 [slave keyboard (3)]
↳ Dell WMI hotkeys id=10 [slave keyboard (3)]



From the output above, it's quite obvious which input device we'll be working with (id=8 if you can't spot it). Next, we'll move on to list down the device properties:

mike@myhost:~$ xinput list-props 8
Device 'SONiX Targus Soft-Touch Cordless Mouse':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (260): 0
Device Accel Constant Deceleration (261): 1.000000
Device Accel Adaptive Deceleration (262): 1.000000
Device Accel Velocity Scaling (263): 10.000000
Evdev Axis Inversion (264): 0, 0
Evdev Axes Swap (266): 0
Axis Labels (267): "Rel X" (153), "Rel Y" (154)
Button Labels (268): "Button Left" (146), "Button Middle" (147), "Button Right" (148), "Button Wheel Up" (149), "Button Wheel Down" (150), "Button Horiz Wheel Left" (151), "Button Horiz Wheel Right" (152), "Button Side" (524), "Button Extra" (525), "Button Unknown" (259), "Button Unknown" (259), "Button Unknown" (259), "Button Unknown" (259)
Evdev Middle Button Emulation (269): 0
Evdev Middle Button Timeout (270): 50
Evdev Wheel Emulation (271): 0
Evdev Wheel Emulation Axes (272): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (273): 10
Evdev Wheel Emulation Timeout (274): 200
Evdev Wheel Emulation Button (275): 4
Evdev Drag Lock Buttons (276): 0


To properly "decelerate" the mouse pointer, we'll need to play around with 2 properties:

Device Accel Constant Deceleration (261)
Device Accel Adaptive Deceleration (262)

To update a property value, use the "--set-prop" option like below:

mike@myhost:~$ xinput --set-prop 8 261 4

Note the values used:

8: device id
261: property id
4: value of the property to be set

Setting both property value to 4 works for me; YMMV.

Have fun tweaking your input :)

Saturday, September 28, 2013

Tagged under: , ,

How to turn on a computer through LAN

Yesterday I used my laptop and wanted to get some files on my desktop which was at the next room. Both are connected to the same router and they have shared folders which I can use to transfer files between them. All I need to do is to push the power button to turn on the desktop. That's ok if I am near it but I often "travel" everywhere at home and sometimes the door is closed. Here's what I do to turn it on remotely.

First, make sure that your mainboard supports something like "Wake on LAN" or "Power on by PCI devices" by press Del repeatedly (it can be some other keys, just notice the line "Press <somekey> to enter setup..." when you turn on your computer) when your computer is booting in order to enter the BIOS settings, then check the Power Management part and enable them. Because the menu is different between types of mainboards, I can't point the names exactly but the function is the same.

When this function is enable, here's how "Wake on LAN" works:
When your computer is off, if you don't unplug the electric cable, the mainboard still has power and so do everything on it (PCI cards, onboard LAN...). So if your mainboard has "Wake on LAN", all you have to do is giving it a "magic packet" through LAN cable and the computer will be turned on!

I use a free software named WakeMeOnLan:


You can download it here:
http://www.nirsoft.net/utils/wake_on_lan.html

Just press the "play icon" to scan all the computers in your network, right click on the one you want to wake and choose "Wake up Selected Computers", it will send the packet for you. Good luck!

Wednesday, September 4, 2013

Tagged under: , , , ,

How to set default file manager in Ubuntu


















Sometimes you have a better file manager and want to set it default. You can do it by change a line of text in a file called defaults.list in Ubuntu.

Open the terminal by Ctrl + Alt + Del

Edit defaults.list file (I use VIM) with root permission:
sudo vim /usr/share/applications/defaults.list

Search the line:
inode/directory=<file-manager-name>.desktop
<file-manager-name> is your preferred file manager name

For example:
Dolphin: kde4/dolphin.desktop
Thunar: Thunar.desktop

Save the file

Note: because of the read-only attribute, you must force to save the file. In VIM, I use :w!

Saturday, August 31, 2013

Tagged under: , , ,

Hotkey to close Chrome Download Bar

If you're using Chrome, after any download completes, Download Bar will appear at the bottom of your browser. It sticks at there and occupies a space until you press X to close it.








It's very annoying. Google doesn't support any official hotkey to close it but here's the tricky way:

Press Ctrl + J (open Downloads tab)
then Press Ctrl + W (to close it)
and the Download Bar will go away!

Tuesday, August 27, 2013

Tagged under: , , , ,

Common commands in Ubuntu

Manage software packages:

Update package list (you should do this before running all commands below):
sudo apt-get-update
Install: sudo apt-get install <name>
Remove: sudo apt-get remove <name>
Remove and remove configuration files:
sudo apt-get remove <name> --purge
Search: apt-cache search <name>
List installed packages: sudo dpkg --get-selections



Wednesday, August 21, 2013

Tagged under: , ,

How to overcome the Facebook security check of identifying friends by their photo

Whether you created a real Facebook account or a fake one, sometimes you may be encounter a kind of Facebook security check that requires you to identify your friends by their photo or Facebook won't let you to access your account. Here's how I overcome it.

First thing to say is I don't know exactly the rules that Facebook staff use to identify fake account. But I think if you make friend with some people regularly day by day, someday Facebook will think your account is fake and it requires you to pass its check to continue to use your account.

The most difficult thing here is the check only available in a specific amount of time. If it takes you too much time to identify your friends, you will be failed and you must wait an hour to try again!

Ok, and this is how I overcome it.

When Facebook shows me first 3 random photos of someone in my friend list and a auto-complete textfield to enter his/her name, I use this textfield to get all the names in my friend list. I type A, and the textfield will suggest me all the names begin with A. Just do like this until Z and I will get my friend list.

After that, I use another Facebook account to search every friend, check their public photos (Facebook always uses public photos in the check) and remember every face of them. For more convenience, I save one of their photos and name the file with their name. Finally, I wait an hour and do the check again.

I know this way take time and effort much but so far it's may be the only way to solve my problem.