Posts

Showing posts from 2012

Copy Directory Structure Only

When I create folders for the new academic semester, I almost always follow the same directory structure. Courses, weeks, reading materials, assignments, exams, etc. For each course, this becomes tedious.  Since I have already done this before, why do I have to go through the same thing again and again and again? So looked around and found the following solution. The following has been tested and it works. You have the original directory structure on, lets say,  /home/tester/Documents/2012/Fall . You want to have all the directories within this under /home/tester/Documents/2012/Spring . You initially need to create the Spring directory (either via command promt- mkdir Spring -or via GUI). Then the following two commands, under linux, will create all the directories under Spring directory. # cd /home/tester/Documents/2012/Spring # (cd /home/tester/Documents/2012/Fall; find -type d ! -name .) | xargs mkdir

Inverting direction of mouse scroll wheel

There is a registry setting named FlipFlopWheel that does this! HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\X\Y\Device Parameters . There might be multiple mouse entries. The default value for FlipFlopWheel should already ready 0. Change into 1 to invert scrolling. Reboot or possibly replug in mouse for changes to take effect. To find what X and Y are, goto Control Panel > Mouse > Hardware Select the HID-compliant mouse and click on Properties. Go to Details TAB and under Property drop-down menu, click on "Device Instance Path".

Removing columns of characters from a line

In a file with a similar content shown below, one can remove certain columns based on the delimiters. aaa:123:sometext1:name1:zz bbbbbbb:44457:sometext2:name2:yy2 ccccc:783456:sometext3:name3:xx3 If, for example, one wants to remove the part sometext# in each line, use the following command cut -d: -f1,2,4,5 filename : is the delimiting character. filename is the name of the file that contains the text (duh!!) If the delimiter is space , such as the following bb1 457 sometext2 name2 yy2 use the following command: cut -d' ' -f1,2,4,5 filename

Chocolate Hazelnut Biscotti

Image

Apple Sharlotka