Pages

Sunday, January 31, 2010

Rxvt is a better terminal for cygwin


@echo off
C:
chdir C:\cygwin\bin
set EDITOR=vi
set VISUAL=vi
set CYGWIN=codepage:oem tty binmode title
rxvt -sr -sl 10000 -fg white -bg black -fn fixedsys -fb fixedsys -tn cygwin -e bash --login -i
http://c2.com/cgi/wiki?BetterCygwinTerminal

Saturday, January 30, 2010

Mounting an ISO in Windows 7

The utility that we will use is called Virtual Clone Drive. This utility will let you mount .ISO, .CCD, .DVD, .IMG, .UDF and .BIN files. Download the utility and start the setup process.

Alternatives

  • Virtual CD-ROM (Microsoft) – This utility does not work in Windows Vista
  • MagicDisk – This is a nice, free utility with more features, but it's not quite as simple to use.
  • Alcohol 52% – Free version of Alcohol 120, but it bundles a browser toolbar that they claim isn't spyware. It's unacceptable.
  • Daemon Tools – Well known tool, but the latest version installs spyware on your computer, and the old version doesn't work in Vista or 7.


File Synchronization

Opensource

Free for light useage

WinSCP

Using rsync
rsync -auz /src/foo hostB:/dest
rsync -auz hostB:/dest/foo /src

The first command pushes all the files that are newer on hostA to hostB. The second command will pull all the files that are newer on hostB to hostA. The critical options are: 
- when copying, you must preserve file modification times. "-a" does this and other things; if you want to preserve just the modification times, use "-t" instead.
- you must skip any files that are newer on the destination: "-u" does this.


Friday, January 29, 2010

Relocate user profile to another drive in Windows 7


First active the administrator account (from a cmd prompt "Run as administrator")
net user administrator /active:yes
net user administrator password
http://www.windows7home.net/how-to-enable-or-disable-administrator-account-in-windows-7/

Second, move c:\Users\x to another drive such as d:\Users\x

Finally, create the symbolic link
mklink /D C:\Users\x  D:\users\x
http://www.tips5.com/how-to-relocate-user-profile-folder-to-other-drive-in-windows-7

Plotting points on a map based on free text


Under the hood here is what happens:

Reference

http://www.wait-till-i.com/2010/01/29/adding-map-links-and-a-small-map-to-any-text-using-javascript-addmap-js/

System V Queues

Just a memory place holder and a couple of useful commands

ipcs - show
ipcrm - used to clear the queue

Monday, January 25, 2010

Bandwidth Throttle on MAC

ipfw add pipe 1 from any to any out
ipfw add pipe 2 from any to any in
ipfw pipe 1 config bw 128Kbits/s
ipfw pipe 2 config bw 256Kbits/s

ipfw pipe 1 config delay 200ms
ipfw pipe 2 config delay 200ms

ipfw flush

Sunday, January 10, 2010

Dot Underscore (._*) files in Mac

When creating a tar file in the mac.. the operating system adds ._* files for some reason.  To disable this..

export COPYFILE_DISABLE=true

Installing the VirtualBox "Tools" in Fedora Core 10

From the fedora package install media..

sudo rpm -ivh kernel-devel-2.6.27.5-117.fc10.i686.rpm kernel-headers-2.6.27.5-117.fc10.i386.rpm gcc-4.3.2-7.i386.rpm glibc-devel-2.9-2.i386.rpm glibc-headers-2.9-2.i386.rpm

Mount the VBoxAdditions from the VirtualBox menu

sudo /media/VBOXADDITIONS_3.1.2_56127/VBoxLinuxAdditions-x86.run

Restart the VM.. not sure why just restarting X didn't work, but either way it does the trick.

Saturday, January 2, 2010

Access Denied When Deleting Flash Plugin

"When you try to delete flash plugin (flash6.ocx, flash10c.ocx) from %windir%\system32\Macromed\Flash folder, you get "permission denied" even if you're the owner of the directory. The reason is that Flash plugin installer sets DENY WRITE permissions in NTFS ACL for this file, and DENY permissions rules always override ALLOW rules. So when you try to delete even you're the owner of the files, you're denied to do that :)

To fix this and delete the file, first run regsvr32 /u <path_to_file> command to unregister the file (if it's registered in the system). Then you have to open file properties, go to "Security" tab, click "Advanced" button and remove two "Deny" entries there. Then you won't have any problems deleting the file."


http://sharovatov.wordpress.com/2009/11/

or

http://trukhanov.wordpress.com/2009/10/15/adobe-flash-files-delition/ (more details if you read Russian)


Take control of system protected files in Windows 7

For Files:

takeown /f file_name /d y
icacls file_name /grant administrators:F

For Directories (will perform action recursively):

takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t



Friday, January 1, 2010

Windows 7: After copy of favorites from old system

1. Open an admin command prompt
2. navigate to the directory containing your favorites folder (C:\Users\username, unless you have moved it)
3. Execute this command:


icacls favorites /setintegritylevel (oi)(ci)low


http://social.technet.microsoft.com/Forums/en/itprovistaie/thread/e46ec7d1-9706-4d3c-a687-f81c1ceaa298