Disable a Run/Share across network

You have done a \\machine_name\C$ and now you want to break the connection without reboot the current host machine.

Show the link by using the following:
cmd>net use

Delete the link by using the following:
cmd>net use \\machine_name\C$ /del

Getting Ubuntu SSH Server running, allows nomachine to work too

No SSH - No No Machine

I've been using No Machine to remote into machines for quite a while now and all I can say is that I'll never go back to VNC.

I recently completely reinstalled my fileserver with Ubuntu 8.10 and installed the no machine server in the recommended way. I fired up the client and got a "connection refused on port 22".

It had been so long since I did a fresh installation of Ubuntu that I'd forgotten that Ubuntu ships with a SSH client but not the server. I found some useful info here.

To get your system up to speed all you need to do is:
sudo apt-get install openssh-server openssh-client

You can test it with:
ssh your_user@localhost

Now your system can frolic in its No Machine goodness!

Accuvant Holland America Evaluation Agmt 12 6 2011

From: Ruckman, Maurice (HAL)
Sent: Wednesday, December 14, 2011 10:24 AM
To: Mounagurusamy, Jayakumar (HAL)
Cc: Augustine, Anila (HAL)
Subject: RE: Accuvant Holland America Evaluation Agmt 12 6 2011
Importance: High

Encryption Algorithm used is DESede:

Triple DES Encryption (also known as DES-EDE, 3DES, or Triple-DES). Data is encrypted using the DES algorithm three separate times. It is first encrypted using the first subkey, then decrypted with the second subkey, and encrypted with the third subkey.

Technical Notes for Reference:

C:changeMancomhalwsecurityDESedeEncrypter.java
public static String ENCRYPTION_ALGORITHM = "DESede";
Cipher cipher = Cipher.getInstance( ENCRYPTION_ALGORITHM );

Refer: Accuvant Holland America Evaluation Agmt 12 6 2011 [pdf]

Understanding Style Precedence in CSS

Refer: link [pdf]

Specificity is calculated by counting various components of your css and expressing them in a form (a,b,c,d). This will be clearer with an example, but first the components.

  • Element, Pseudo Element: d = 1 – (0,0,0,1)
  • Class, Pseudo class, Attribute: c = 1 – (0,0,1,0)
  • Id: b = 1 – (0,1,0,0)
  • Inline Style: a = 1 – (1,0,0,0)

An id is more specific than a class is more specific than an element.

Fixing slow loading of attachments from Outlook

Do you experience a long wait when opening attachments from within Outlook? And the same file opens in a snap when you save the attachment first on your hard disk, launch the program and then open the file from within the program?

If you answered yes to all questions above, you probable have a DDE issue. DDE (short for Dynamic Data Exchange) allows applications to communicate with one another. For example, when you double-click a document in Windows Explorer, and the associated application is already running, Explorer sends a DDE message to the application, with instructions to open the document on its own, rather than launching another copy of the application. Sounds neat, no?

Well, on my machine, DDE has the tendency to get corrupted… or at least confused. I’m not sure why, but when that happens, it does cause significant delays in opening documents. Not only when launching it from Outlook, also when double-clicking a file in Windows Explorer.

The solution? Disable DDE for those file types that you have trouble with. Like Word, Excel and PowerPoint documents. This is the process:

1. Explorer, Folder Options, File Types
2. In the File Types tab, select the file extension you want to change (e.g. .doc for Word documents)
3. Click the Advanced button
4. Select the Open action, click Edit. You will get a dialog box like this:
5. Uncheck Use DDE


6. In the field Application used to perform action, you will see something similar to
"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" /n /dde
Remove everything after the application (in this case /n /dde) and add "%1". (Ensure you put %1 between double quotes ("), otherwise this might not work if the folder and/or filename of the document contains spaces).
The field should now contain

"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" "%1?

7. Click OK, OK, Close

That’s it. One final note: the DDE functionality gets restored when you re-install the application. But that will probably also fix the DDE issue itself, and if not, simply follow the instructions above again.

Unix Less Command: 10 Tips for Effective Navigation

1. Less Command – Search Navigation

Once you’ve opened a log file (or any file) using less file-name, use the following keys to search. Please note that the match will be highlighted automatically by default.
Forward Search

/ – search for a pattern which will take you to the next occurrence.
-i - ignore case in searches
n – for next match in forward
N – for previous match in backward

Backward Search

? – search for a pattern which will take you to the previous occurrence.
n – for next match in backward direction
N – for previous match in forward direction

Tip: If you dont bother about which direction the search is happening, and you want to search file path, or URL, such as “/home/ramesh/”, you can use backward search (?pattern) which will be handy as you don’t want to escape slashes each time.

Search Path
In forward: /\/home\/ramesh\/
In backward: ?/home/ramesh/

2. Less Command – Screen Navigation

Use the following screen navigation commands while viewing large log files.

CTRL+F – forward one window
CTRL+B – backward one window
CTRL+D – forward half window
CTRL+U – backward half window

3. Less Command – Line navigation

In a smaller chunk of data, where you want to locate particular error, you may want to navigate line by line using these keys:

j – navigate forward by one line
k – navigate backward by one line

4. Less Command – Other Navigations

The following are other navigation operations that you can use inside the less pager.

G – go to the end of file
g – go to the start of file
q or ZZ – exit the less pager

5. Simulate tail -f inside less pager – Press F

Once you’ve opened a file using less command, any content that is appended to the file after that will not be displayed automatically. However, you can press F less command will show the status ‘waiting for data‘. This is as similar to ‘tail -f’.

Also, refer to our earlier article about how to view multiple logs files using tail -f.
6. Less Command – Count magic

Similar to Vim editor navigation command, you can give 10j to scroll 10 lines down, or 10k to go up by 10 lines.

10j – 10 lines forward.
10k – 10 lines backward.
CTRL+G – show the current file name along with line, byte and percentage statistics.

7. Other useful Less Command Operations

v – using the configured editor edit the current file.
h – summary of less commands
&pattern – display only the matching lines, not all.

8. Open any types of files using less command

As we discussed in our earlier article, you can use less command to Open & view 10 different file types.
9. Less Command – Marked navigation

When you are viewing a large log file using less command, you can mark a particular position and return back to that place again by using that mark.

ma – mark the current position with the letter ‘a’,
‘a – go to the marked position ‘a’.

10. Less Command – Multiple file paging

Method 1: You can open multiple files by passing the file names as arguments.

$ less file1 file2

Method 2: While you are viewing file1, use :e to open the file2 as shown below.

$ less file1
:e file2

Navigation across files: When you opened more than two files ( for e.g – less * ), use the following keys to navigate between files.

:n – go to the next file.
:p – go to the previous file.

Remove Programs from the Open With Menu in Explorer

Would you like to clean up the Open with menu in Windows Explorer? Here’s how you can remove program entries you don’t want in this menu on any version of Windows.

Have you ever accidentally opened an mp3 with Notepad, or a zip file with Word? If so, you’re also likely irritated that these programs now show up in the Open with menu in Windows Explorer every time you select one of those files. Whenever you open a file type with a particular program, Windows will add an entry for it to the Open with menu. Usually this is helpful, but it can also clutter up the menu with wrong entries.

bloated openwith menu

On our computer, we have tried to open a PDF file with Word and Notepad, neither which can actually view the PDF itself. Let’s remove these entries. To do this, we need to remove the registry entries for these programs. Enter regedit in your Start menu search or in the Run command to open the Registry editor.

Backup your registry first just in case, so you can roll-back any changes you make if you accidently delete the wrong value.

Now, browse to the following key:

HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \ Explorer \FileExts\

Here you’ll see a list of all the file extensions that are registered on your computer.

Browse to the file extension you wish to edit, click the white triangle beside it to see the subfolders, and select OpenWithList. In our test, we want to change the programs associated with PDF files, so we select the OpenWithList folder under .pdf.

Notice the names of the programs under the Data column on the right. Right-click the value for the program you don’t want to see in the Open With menu and select Delete.

Click Yes at the prompt to confirm that you want to delete this value.

Repeat these steps with all the programs you want to remove from this file type’s Open with menu. You can go ahead and remove entries from other file types as well if you wish.

Once you’ve removed the entries you didn’t want to see, check out the Open with menu in Explorer again. Now it will be much more streamlined and will only show the programs you want to see.

Conclusion

This simple trick can help you keep your Open with menu tidy, and only show the programs you want in the list. It can be irritating to accidentally open files in programs that can’t even read them. This trick works in all versions of Windows, including 2000, XP, Vista, and Windows 7.

Cleanup "Open With" in Windows