Sunday, October 19, 2014

Set IPython qtconsole font to terminus

ipython qtconsole --ConsoleWidget.font_size=10 --ConsoleWidget.font_family="Terminus"

Or create ~/.ipython/profile_default/ipython_config.py Reference(s):
http://stackoverflow.com/questions/9906938/change-ipython-qtconsole-settings

Monday, July 21, 2014

Eclipse shortcut keys

This are some of the shortcut keys that I find useful while working with Eclipse.

Key Action
Ctrl+/ Comment out the current line
Ctrl+\ Uncomment the current line
Ctrl+D Delete the current line
Ctrl+M Maximize editor view
Ctrl+Alt+Arrow Up Duplicate current line, maintain caret location
Ctrl+Alt+Arrow Down Duplicate current line, move caret location down
Window Navigation
Ctrl+F7 Move to different views.
Ctrl+F6 Move to different editor windows
Alt+Shift+Q+C Focus Console View
Alt+F7 Switch between different consoles

Sunday, July 20, 2014

PyCharm 3.4 Community Edition does not support Tfs Integration

PyCharm 3.4 Community is a very fine IDE and I cannot complain. But for some of the stuff that I do I need to use Tfs as source control. I spent quite a few hours searching the web how to enable Tfs integration in PyCharm but I can't find a good documentation that says you can't not use in PyCharm. But IntelliJ IDEA feature comparison matrix shows that Tfs Integration is only available in Ultimate.  So it must be the case that Tfs Integration is only available in Professional version or it just does not work.

Saturday, July 19, 2014

Unable to mount VirtualBox shared drive using 4.3.10

When mounting a shared drive in VirtualBox 4.3.10, got he following error in Linux box:

sudo mount -t vboxsf E_DRIVE vbox
mount: wrong fs type, bad option, bad superblock on E_DRIVE,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

This is caused by wrong symbolic link, to fix it do:

~$ sudo ln -sf /usr/lib/i386-linux-gnu/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

References:
http://superuser.com/questions/736024/cannot-share-host-directory-with-virtualbox-guest-mint-16-64-bit

Vi Editor common keys

My commonly used vi shortcut keys:

CommandActionNotes
File operations
:qQuit VIThis will exit VI editor
:q!Force quitThis will exit VI editor even if buffers are dirty
:wSave current bufferSave currently active buffer
:bdKill current buffer
General
:set numberShow line number
:set nuShow line number
Text Operations
vStart Visual Mode(for copying)
yYank/copy selected text
yyCopy line
2yCopy 2 lines from the cursor
pPaste _after_ the current line
PPaste _before_ the current line
xDelete char under the cursor
dwDelete the word under the cursorThis will also delete the space after it
3dwDelete 3 wordsThis will also delete the space after it
ddDelete lineDeletes the entire line
Navigation
0Jump to beginning of line
$Jump to end of line
bMove to the beginning of the word
eMove to the end of the word (punctuation considered part of the word)
geJump to previous word ending
gEJump to previous word ending, ignore punctuation
ggStart of file
GEnd of file
21GGo to line 22
Search
/{string}{ENTER}Search for string
Merging
Note** run vimdiff file1 file2
]cJump to the next difference
[cJump to the previous difference
doCopy line diff from _right_ buffer to the _left_ buffer
dpCopy line diff from _left_ buffer to the _right_ buffer

Tutorials
VIM Introduction and Tutorial (link)
VI Cheat Sheet (link)
VIM Tips (link)
Code Merging with VIM (link)

Sunday, April 20, 2014

ICS not working in Windows 8.1 with SEP installed

ICS (Internet Connection Sharing) in Windows 8.1 with Update is not working with SEP (Symantec End Point) version 12.1.4013. Quick fix is to remove both Network Thread Protection or Network Access Control.

Saturday, March 22, 2014

Extracting tar.gz file into specific folder

For example, to extract pycharm-community-3.1.1.tar.gz to ~/bin folder do:
$: tar -xvzf pycharm-community-3.1.1.tar.gz -C ~/bin