Convert magnet to bit torrent online









http://magnet2torrent.com/


VIM: Fix indentations








In normal mode, gg=G where gg goes back to the first line and =G re-indents.


Mac OS X Finder: show or hide file extensions








In Finder's Preferences, activate Advanced tab, and tick Show all file extensions




MacVIM: set default font in .gvimrc








edit ~/.gvimrc:
set guifont=Monaco:h15
Note: there is NO spaces around the equal sign.
set guifont=Courier\ New:h15
Note: slashes are required if the font name contains spaces.


VI (VIM): show or hide special characters








  • To show special characters e.g. tabs or line-breaks:
    :set list
    or set it in .vimrc
    set list
  • To hide special characters e.g. tabs or line-breaks:
    :set nolist
    or set it in .vimrc
    set nolist



Eclipse delete password entry from secure storage











Preference > General > Security > Secure Storage > Contents > > Delete





Free Windows Apps











NameCategoryDescription
CutePDF writerPDF writerCutePDF Writer installs itself as a "printer subsystem". This enables virtually any Windows applications (must be able to print) to convert to professional quality PDF documents - with just a push of a button!
Microsoft security essentialsAnti-virusMicrosoft security essentails.
Sumatra PDFPDF ReaderSumatra PDF is a free PDF, eBook (ePub, Mobi), XPS, DjVu, CHM, Comic Book (CBZ and CBR) reader for Windows. Sumatra PDF is powerful, small, portable and starts up very fast.Simplicity of the user interface has a high priority.



让人受益终生的30个英语成语








  1. Pain past is pleasure.
    痛苦过去就是快乐。
  2. While there is life, there is hope.
    有生命就有希望。留得青山在,不怕没柴烧。
  3. Wisdom in the mind is better than money in the hand.
    脑中有知识,胜过手中有金钱。[从小灌输给孩子的坚定信念。]
  4. Storms make trees take deeper roots.
    风暴使树木深深扎根。[感激敌人,感激挫折!]
  5. Nothing is impossible for a willing heart.
    心之所愿,无所不成。[坚持一个简单的信念就一定会成功。]
  6. The shortest answer is doing.
    最简单的回答就是干。[想说流利的英语吗?那么现在就开口!心动不如嘴动。]
  7. All things are difficult before they are easy.
    凡事必先难后易。[放弃投机取巧的幻想。]
  8. Great hopes make great man.
    伟大的理想造就伟大的人。
  9. God helps those who help themselves.
    天助自助者。
  10. Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.
    四个简短的词汇概括了成功的秘诀:多一点点![比别人多一点努力、多一点自律、多一点决心、多一点反省、多一点学习、多一点实践、多一点疯狂,多一点点就能创造奇迹!]
  11. In doing we learn.
    实践长才干。
  12. East or west, home is best.
    东好西好,还是家里最好。
  13. Two heads are better than one.
    三个臭皮匠,顶个诸葛亮。
  14. Good company on the road is the shortest cut.
    行路有良伴就是捷径。
  15. Constant dropping wears the stone.
    水滴穿石。
  16. Misfortunes never come alone/single.
    祸不单行。
  17. Misfortunes tell us what fortune is.
    不经灾祸不知福。
  18. Better late than never.
    迟做总比不做好;晚来总比不来好。
  19. It’s never too late to mend.
    过而能改,善莫大焉;亡羊补牢,犹未晚也。
  20. If a thing is worth doing it is worth doing well.
    如果事情值得做,就值得做好。
  21. Nothing great was ever achieved without enthusiasm.
    无热情成就不了伟业。
  22. Actions speak louder than words.
    行动比语言更响亮。
  23. Lifeless, faultless.
    只有死人才不犯错误。
  24. From small beginning come great things.
    伟大始于渺小。
  25. One today is worth two tomorrows.
    一个今天胜似两个明天。
  26. Truth never fears investigation.
    事实从来不怕调查。
  27. The tongue is boneless but it breaks bones.
    舌无骨却能折断骨。
  28. A bold attempt is half success.
    勇敢的尝试是成功的一半。
  29. Knowing something of everything and everything of something.通百艺而专一长。
  30. Good advice is beyond all price.
    忠告是无价宝。



Skype for Mac: disable auto spelling correction








Skype enables the spelling correction by default which makes more trouble for me than it benefits. To disable it:
  • Edit -> Spelling and Grammar
  • uncheck Correct Spelling Automatically



.nfs files: what are they?








The .nfsXXXXXX files are created when an open file is removed but is still being accessed. The NFS client trying to maintain proper "delete on later close" unix behavior within its own operational abilities. This NFS behavior is known as "silly rename": http://nfs.sourceforge.net/#faq_d2

NFSv4.1 will get away from this behavior with OPEN4_RESULT_PRESERVE_UNLINKED: http://tools.ietf.org/html/rfc5661#section-18.16.


SSH server: disable root login








edit /etc/ssh/sshd_config:
sudo vi /etc/ssh/sshd_config
comment out the following line:
#PermitRootLogin no
restart ssh server:
/etc/init.d/ssh restart



tar: exclude leading components in the path when extracting an archive








If a archive with structure of /dir1/dir2/dir3/ and I want to exclude /dir1/dir2 when extracting:

tar xvf my.tar --strip-components=2



tar: exclude leading part of the absolute path when making an archive








  • When archiving /dir1/dir2/dir3/*.txt using tar, I want to include only the dir3/*.txt in the archive. -C option (means change directory to) can be used.

    tar -C /dir1/dir2 -cvf dir3.tar dir3/*.txt



Mac OS X: Add or remove folder to Favorites Side bar in Finder








  • To add a folder to the favorites sidebar, hold command key and use the mouse to drug the folder onto Faverites.
  • To remove the folder from the favorites sidebar: right click the folder, select "Remove from sidebar"