Common image file extensions can be downloaded from here. Please click following link to view the file.
Click to View File
Friday, December 2, 2011
vi Commands
vi is a Visual Editor (hence the name -- vi for VIsual). vi is a widely-used and popular UNIX-based text editor. Like most UNIX system interfaces and other text editors, it lets you control the system by using the keyboard rather than a combination of mouse selections and keystrokes.
Edit a File
| Edit a file from command prompt | |
| Edit a file from command prompt for reading only | vi -R |
| Edit a file from within vi | :e |
| Edit a new file from within vi, discard changes to current file | :e! |
| Reload current file, discarding changes | :e! |
| Go forwards a page | Ctrl+F (or PgDn) |
| Go backwards a page | Ctrl+B (or PgUp) |
| Move around single lines or characters | Arrow keys |
| Save changes | :w |
| Save changes and override protected (read-only) files | :w! |
| Save changes and exit vi | ZZ |
| Quit | :q |
| Quit and discard changes | :q! |
| Get general help | :help |
| Get help on a command (eg. :set) | :help set |
Go to lines, find matching text
| Go to line 1234 (do not see typing) | 1234G |
| Go to line 1234 (see typing) | :1234 |
| Go to start of file | 1G |
| Go to end of file | G |
| Find (forwards) a line containing "swordfish" | /swordfish |
| Find (forwards) a line using a regular expression | /you see .* here |
| Repeat last search | n |
| Repeat last search in opposite direction | N |
| Find (backwards) a line containing "swordfish" | ?swordfish |
| Find (backwards) a line using a regular expression | ?you see .* here |
| Search case insensitive (Ignore Case) | :set ic |
| Search with case sensitivity | :set noic |
| Wrap searches back to start of file | :set wrapscan |
| Do not wrap searches | :set nowrapscan |
Insert Text
| Insert after cursor | i |
| Insert before cursor | a |
| Insert at beginning of line | I |
| Insert at end of line (append) | A |
| Open (start) new line below cursor | o |
| Open (start) new line above cursor | O |
Advance Deletion
| Delete next 5 lines | 5dd |
| Delete to end of line | d$ |
| Delete to start of line | d0 |
| Delete to word "swordfish" | d/swordfish |
| Delete to the letter "x" | dfx |
| Delete lines 10 to 20 | :10,20d |
| Delete current line and another 5 lines | :.,+5d |
| Delete all lines | :%d |
| Delete current word | dw |
| Find line containing pattern, delete it | :/pattern/d |
| Find line containing "dog", delete until line containing "cat" | :/dog/,/cat/d |
| Delete from current line to line containing "foo" | :.,/foo/d |
Sunday, November 27, 2011
Reset Joomla administrator password?
Joomla's admin username can be easily changed with a simple MySQL query.
Open mysql console and execute the following query
UPDATE `jos_users` SET `password` = MD5( 'new_password' ) WHERE `jos_users`.`username` = "admin"
Thursday, August 25, 2011
Windows Shortcut Keys
Below is a listing of all the major Windows shortcut keys
| Shortcut Keys | Description |
| Alt + Tab | Switch between open applications. |
| Alt + Shift + Tab | Switch backwards between open applications. |
| Alt + double-click | Display the properties of the object you double-click on. For example, doing this on a file would display its properties. |
| Ctrl + Tab | Switches between program groups or document windows in applications that support this feature. |
| Ctrl + Shift + Tab | Same as above but backwards. |
| Alt + Print Screen | Create a screen shot only for the program you are currently in. |
| Ctrl + Print Screen | Creates a screen shot of the entire screen |
| Ctrl + Alt + Del | Reboot the computer and brings up the Windows task manager. |
| Ctrl + Shift + Esc | Immediately bring up the Windows task manager. |
| Ctrl + Esc | Bring up the Windows Start menu. In Windows 3.x this would bring up the Task Manager. |
| Alt + Esc | Switch Between open applications on taskbar. |
| F1 | Activates help for current open application. |
| F2 | Renames selected Icon. |
| F3 | Starts find from desktop. |
| F4 | Opens the drive selection when browsing. |
| F5 | Refresh Contents to where you were on the page. |
| Ctrl + F5 | Refreshes page to the beginning of the page. |
| F10 | Activates menu bar. |
| Shift + F10 | Simulates right-click on selected item. |
| F4 | Select a different location to browse in the Windows Explorer toolbar. |
| Alt + F4 | Closes Current open program. |
| Ctrl + F4 | Closes Window in Program. |
| F6 | Move cursor to different Windows Explorer pane. |
| Alt + Space bar | Drops down the window control menu. |
| Ctrl + (the '+' key on the keypad) | Automatically adjust the widths of all the columns in Windows explorer |
| Alt + Enter | Opens properties window of selected icon or program. |
| Alt + Space bar | Open the control menu for the current window open. |
| Shift + Del | Delete programs/files without throwing them into the recycle bin. |
| Holding Shift | Boot Safe Mode or by pass system files as the computer is booting. |
| Holding Shift | When putting in an audio CD, will prevent CD Player from playing. |
| Enter | Activates the highlighted program. |
| Alt + Down arrow | Display all available options on drop down menu. |
| * (on the keypad) | Expands all folders on the currently selected folder or drive in Windows Explorer. |
| + (on the keypad) | Expands only the currently selected folder in Windows Explorer. |
| - (on the keypad) | Collapses the currently selected folder in Windows Explorer. |
Friday, May 6, 2011
Ubuntu Linux: How do I install .deb packages?
dpkg is a tool to install, build, remove and manage packages. dpkg
itself is controlled entirely via command line parameters. For example
-i use to install .deb file.
How do I install .deb file?
To install package called package.deb type the following command:
Go to directory where package.deb is kept. For example if it is in /tmp directory:
Type the following command:
How do I install .deb file?
To install package called package.deb type the following command:
Go to directory where package.deb is kept. For example if it is in /tmp directory:
$ cd /tmpType the following command:
$ sudo dpkg -i package.deb
Wednesday, February 2, 2011
VI Editor Tips
The VI editor is a screen-based editor used by Linux/Unix users. The VI editor has powerful features to aid programmers. VI has two modes insertion mode and command mode. The editor begins in command mode. Insertion mode begins upon entering an insertion or pressing 'i' in keyboard. [ESC] returns the editor to command mode.
Following tips may be helpful for programmers / content writers.
Execute the command from VI Editor command mode. (press Esc, If Insert mode)
Insert space/character between 2 adjacent characters
Example 1
'LinuxFor' becomes 'Linux For' (Sentence Case)
Example 2
'Kerala government' becomes 'Kerala Governemnt'
Removes all lines starts with a word/patterrn.
Removes all lines begin with 'Ele'
Removes all lines end with 'are'
Removes blank lines
Following tips may be helpful for programmers / content writers.
Execute the command from VI Editor command mode. (press Esc, If Insert mode)
Insert space/character between 2 adjacent characters
Example 1
'LinuxFor' becomes 'Linux For' (Sentence Case)
:%s/\([a-z]\)\([A-Z]\)/\1 \2/gExample 2
'Kerala government' becomes 'Kerala Governemnt'
:%s/\([a-z]\) \([A-Z]\)/\1 \U\2/gRemoves all lines starts with a word/patterrn.
Removes all lines begin with 'Ele'
:g/^Ele.*$/dRemoves all lines end with 'are'
:g/$*.are/dRemoves blank lines
:g/^$/dMake First Letter Capital
:%s/^./\U&/
Monday, January 3, 2011
Find out a file which contains specific string
To find out a file which contains specific string, execute the following command from shell
# find /var/www/html/mysite-iname '*php' | xargs grep 'about' -s1Here, searchesfor file which contains string 'about' .
Subscribe to:
Posts (Atom)