17 Emacs Commands to Get Started

Ctl-a Beginning of line Ctl-e End of line Ctl-k Delete from cursor position to end of line Esc-a Begining of a sentence, if each sentence is eperated by two blanks Esc-e End of a sentence, if each sentence is seperated by two blanks Esc-k Delete from cursor to end of sentence, if each sentence is [...]

How to Run a Shell Command from Python and Get The Output?

In Python, often you may want to execute linux command and get the output of the command as string variable. Naive way to do that is to execeute the linux command, save the output in file and parse the file. >>> import os >>> cmd = “wc -l myTextFile > outfile” >>> os.system(cmd) A better [...]

Vim and EMACS Jokes on Twitter

The most crucial step to any tutorial: pic.twitter.com/wSaj7gNSQ8 — Kristofer Joseph (@dam) March 19, 2014 I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it. — I Am Devloper (@iamdevloper) February 17, 2014 switch to emacs, they said… pic.twitter.com/mbZVjH23qy — Lukas (@imlxgr) January 27, 2014

How To Remove ^M Characters in Vim?

Moved  a text file between tow different operating systems? Found the annoying ^M special character? Here are ways to remove ^M character. To remove ^M within a line (without creating a a line break) :%s/^V^M//g To remove ^M within a line (creating a a line break) :%s/^V^M/^V^M/g

Great Web Tool to Learn Linux Commands

User Friendly explanation of Linux Command

Ever wondered what these different parameters of a linux command does? One option is to lookup the meaning of each parameter in a command on a man page. For sure sure it is worth doing that, but very cumbersome. The website ExplainShell.com makes it easy to understand the meaning of each parameter in a linux [...]

Eleven IPython Keyboard Shortcuts to Move Around Easily

Eleven IPython keyboard tips/shortcuts to Move Around Easily. Ctrl-p or up-arrow: Access command history in backward Ctrl-n or down-arrow: Access command history  in forward Ctrl-a: Move cursor to beginning of line Ctrl-e: Move cursor to end of line Ctrl-f: Move cursor forward one character Ctrl-b: Move cursor back one character Ctrl-l: Clear screen Ctrl-r: reverse history [...]

How To Paste Code in Python Interpreter? Hint: Use iPython

IPython-logo

If you have formatted code block with proper indentation and want to test it by copying and pasting on a python interpretor, you will be frustrated at Python for complaining at you. iPython offers great solutions for copying and pasting the code right from the terminal interpreter. One useful command in iPython to play with [...]

How To Set PATH variable on Bash Shell?

How Set PATH Variable on BASH Shell: Hint export command

Have a new executable file/program? Want to execute it just by typing the name of the program instead of full path where the program is located?  The best solution is to add the path to new executable to your list of all search paths. The idea is that every time one types a command the [...]

The Great Dropbox Space Race: A way to get free Dropbox space for students

Dropbox Free Space for Students

Dropbox announced the Great Dropbox Space Race for students that offers students free space of up to 25GB for two years. The way the Dropbox space Race works is as a student refers a classmates and professors to Dropbox, not only the students/professors earn free space, everyone from the school who were signed up of [...]

Three Ways to Write Text to a File in Python

If you are interested in writing text to a file in Python, there is probably many ways to do it. Here is three ways to write text to a output file in Python.  The first step in writing to a file is create the file object by using the built-in Python command “open”. To create and [...]