23.11.09

VIM commands. Part 2

 Search

/word
Search “word” from top to bottom
?word
Search “word” from bottom to top
/jo[ha]n
Search “john” or “joan”
/\< the
Search “the”, “theatre” or “then”
/the\>
Search “the” or “breathe”
/\< the\>
Search “the”
/\< ….\>
Search all words of 4 letters
/\/
Search “fred” but not “alfred” or “frederick”
/fred\|joe
Search “fred” or “joe”
/\<\d\d\d\d\>
Search exactly 4 digits
/^\n\{3}
Find 3 empty lines
:bufdo /searchstr/
Search in all open files


VIM Editor Commands, with examples. Part 1

Vim is an editor to create or edit a text file. There are two modes in vim. One is the command mode and another is the insert mode.
In the command mode, user can move around the file, delete text, etc.
In the insert mode, user can insert text.


Changing mode from one to another
From command mode to insert mode type a/A/i/I/o/O ( see details below)
From insert mode to command mode type Esc (escape key)
Some useful commands for VIM
Text Entry Commands (Used to start text entry)
a Append text following current cursor position
A Append text to the end of current line
i Insert text before the current cursor position
I Insert text at the beginning of the cursor line
o Open up a new line following the current line and add text there
O Open up a new line in front of the current line and add text there

17.11.09

Configure network settings in linux via terminal

Applies to (Centos, Fedora, Red Hat Enterprise Linux 5)
Simple method:
# ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255
Or manually edit configuration files stored in /etc/sysconfig/network-scripts/

You can configure network card by editing text files stored in /etc/sysconfig/network-scripts/ directory. First change directory to /etc/sysconfig/network-scripts/:
# cd /etc/sysconfig/network-scripts/
You need to edit / create files as follows:
  • /etc/sysconfig/network-scripts/ifcfg-eth0 : First Ethernet card configuration file
  • /etc/sysconfig/network-scripts/ifcfg-eth1 : Second Ethernet card configuration file
To edit/create first NIC file, type command:

16.11.09

This site is running TeamViewer.

Instructions on how to disable TeamViewer from listening on Port 80. Instructions are as follows:

1. Open port 5938 (TCP) on your firewall.
2. Change the following registry keys.

* [HKEY_LOCAL_MACHINE\SOFTWARE\
TeamViewer\Version4] Key ’GatewayAllowed’ set to 0
*
[HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version4] Key ’ListenHttp’ set to 0

After you make these changes, you should no longer have TeamViewer listening in on port 80, killing your local web server.

9.11.09

Cisco IOS Packaging Codes


c3725-ipbasek9-mz.124-25b.bin
C3725
ipbase
K9
M
Z
124
25
b
Platform
Feature Set
Crypto Incl.
Memory Loc.
Compression Format
Maintenance Release
Individual Release
Numbered Version

c3725-ipbase-mz.124-25b.bin
C3725
ipbase

M
Z
124
25
b
Platform
Feature Set
No Crypto Incl.
Memory Loc.
Compression Format
Maintenance Release
Individual Release
Numbered Version

8.11.09

How to Enable or Disable Quick Launch in Windows 7

By default Quick Launch is disabled in Windows 7. This will show you how to enable or disable Quick Launch on the taskbar in Windows 7 as a toolbar with small or large icons.

Quick Launch is used to open a program quickly from a shortcut on the taskbar. In this case in a toolbar The Quick Launch folder is located at the hidden system folder location (step 2) of:

C:\Users\(user-name)\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

Windows Explorer Taskbar Icon - Change Open To Target

1. Right click on the pinned Windows Explorer taskbar icon, then right click on Windows Explorer in the Jump List and click on Properties. (See screenshot below)