10 great and powerful Linux commands you may want to know Command line is more powerful because you can do lot with them, you can tell your computer exactly what you want and get the appropriate answer. That is why most of us use the terminal at least once a day. Today we will see another List of useful commands, i`m sure that most of you didn`t hear about them before. Lets see . 1- Run the last command as Root sudo !! 2- Save a file you edited in vim/vi without the needed permissions :w ! If you opened a file for edit and when saving you noticed that you forgot to open file as root, the command above is the solution. 3- Runs previous command but replacing : ”foo” by “bar” ^foo^bar If you did run a long command and you noticed that you made a mistake, to correct the command you can replace only the mistake by the correct word without the need to run the whole command again. Another alternative to the above command is: !! As opposed to ^foo^bar, which only replaces the first occurrence of foo, this one changes every occurrence cp filename{,.bak} > file.txt
Introduction to Electrical Engineering and Computer Science I | Electrical Engineering and Computer Science Essential JavaScript Design Patterns For Beginners Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions. In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language. Some of the concepts covered (closures, prototypal inheritance) will assume a level of basic prior knowledge and understanding. Acknowledgments Credits Reading Patterns are not an exact solution. Creational Design Patterns
2. Using the Python Interpreter — Python v3.3.2 documentation 2.1. Invoking the Interpreter The Python interpreter is usually installed as /usr/local/bin/python3.3 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command: to the shell. Since the choice of the directory where the interpreter lives is an installation option, other places are possible; check with your local Python guru or system administrator. (E.g., /usr/local/python is a popular alternative location.) On Windows machines, the Python installation is usually placed in C:\Python33 , though you can change this when you’re running the installer. set path =% path % ; C : \ python33 Typing an end-of-file character ( Control-D on Unix, Control-Z on Windows) at the primary prompt causes the interpreter to exit with a zero exit status. The interpreter’s line-editing features usually aren’t very sophisticated. Some Python modules are also useful as scripts. 2.1.1. 2.1.2. 2.2. 2.2.1. 2.2.2. #! 2.2.3.
Green Tea Press: Free Computer Science Books Lesson 3 - Programs in a file, and variables Introduction Well, we can make one-liner programs. So What? You want to send programs to other people, so that they can use them, without knowing how to write them. Editing in Notepad Writing programs in python to a file is VERY easy. Code Example 1 - mary.py #A simple program. print "Mary had a little lamb," print "it's fleece was white as snow;" print "and everywhere that Mary went", print "her lamb was sure to go." Keep this exactly the same, down to where the commas are placed. Using the IDLE Environment Now, open up the Python IDLE program (should be in your start menu). Code Example 2 - mary.py output Mary had a little lamb, it's fleece was white as snow; and everywhere that Mary went her lamb was sure to go. You can also use IDLE to create Python programs, like what you did in notepad. There are a couple of things to notice here: First of all, the comment wasn't shown. Variables Now lets start introducing variables. Code Example 3 - Variables Strings Code Example 4 - Strings Conclusion
Keyboard Shortcuts for Bash ( Command Shell for Ubuntu, Debian, Suse, Redhat, Linux, etc) The default shell on most Linux operating systems is called Bash. There are a couple of important hotkeys that you should get familiar with if you plan to spend a lot of time at the command line. These shortcuts will save you a ton of time if you learn them. Note that some of these commands may not work if you are accessing bash through a telnet/ssh session, or depending on how you have your keys mapped. Update: Some readers from digg have pointed out that you can also switch bash to use vi style editing keys. This article covers the default bash keys, but I’ll write another one to cover vi style keys as well… great suggestions! Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis.
Learn Python - Free Interactive Python Tutorial