10/13/2013

8 Useful Mac keyboard shortcuts while editing the text

If you spend a lot of time typing the plain text, writing the program, I suggest that you should remember the below Mac keyboard shortcuts to save your time. Here are a few quick shortcuts to set the matter straight for everyone in Mac OSX.

  1. Command + Right
  2. Move to beginning of line.
  3. Command + Left
  4. Move to end of line.
  5. Command + Up
  6. Move to beginning of document.
  7. Command + Down
  8. Move to end of document.
  9. Command + Delete
  10. Delete the entire line of text or paragraph behind the cursor.
  11. Option + Delete
  12. Delete the entire word behind the cursor.
  13. Shift + Command + Left
  14. Select text to beginning of a line.
  15. Shift + command + Right
  16. select text to end of a line.

8/08/2013

How to re-enable Java SE 6 web plug-in in Google Chrome

I think that this problem of applet not working in chrome (32bits) has plagued me for too long. Now, Apple provided us a resolution which re-enables follow these steps:

Open Terminal, located in the Utilities folder.

sudo mkdir -p /Library/Internet\ Plug-Ins/disabled 
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

http://support.apple.com/kb/ht5559

7/25/2013

Retrieve Email Addresses From Outlook

When we copied a group of email address from outlook, how to export into csv file?
echo "Abc 1234 <abc@example.com>; cde 1234 <cde@example.com>" | tr ';' '\n'|  sed 's/.*/ &/;s/.* <\([^ @]*@[^ @]*.com\).*/\1/'

7/22/2013

XML Format in Console

xmllint is a command line xml tool in console to parse one or more xml files. It also can print type of output by the options selected and detect erros both in XML code.

But I mainly used it to format XML format, by using aliases, it can save a lot of time when doing XML format task.

alias xmlformat="xmllint --c14n '$*' | XMLLINT_INDENT=$'  ' xmllint --encode UTF-8 --format -"
http://xmlsoft.org/xmllint.html

What is Refactoring?

A series of small steps, each of which changes the program's internal structure without changing its external behavior - Martin Fowler ^^~