Archive for the 'Remembering' Category

When you want to check all of open ports out on your linux machine.

Command or the name of utilities on Linux is very easy to be forgotten. netstat is useful to retrieve various networking-related data structure. I usually use this command to check what port is open on my machine.

netstat -anp | grep LISTEN

If you want more information abut netstat, just google it, or type “man netstat” on your linux, or click here.

Process Transition State Diagram

Process State Transition Diagram
Click the picture if you want big picture.

This is the process transition state diagram that must be memorized if you were related to the computer science or engineering area.
The picture is from "The Design of the UNIX Operating System" written by Maurice J. Bach in 1986.

The location of registry where your IPsec setting values are

Every time I find the registry information about IPsec, I realize that I already forgot the location.
So, I decide to write down the location.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\IPSec\Policy\Local

I found the similar registry location in Windows Mobile 5.0 registry, this is not confirmed though.

HKEY_LOCAL_MACHINE\Comm\IPSec\Policies

To use IPSec, also check this web site out.
[Check this out babe~]

The power of 2

I major in computer engineering, so that I feel I should be familiar with the powers of 2.

2^0 = 1                         2^17 = 131,072
2^1 = 2                         2^18 = 262,144
2^2 = 4                         2^19 = 524,288
2^3 = 8                         2^20 = 1,048,576
2^4 = 16                       2^21 = 2,097,152
2^5 = 32                       2^22 = 4,194,304
2^6 = 64                       2^23 = 8,388,608
2^7 = 128                     2^24 = 16,777,216
2^8 = 256                     2^25 = 33,554,432
2^9 = 512                     2^26 = 67,108,864
2^10 = 1,024                2^27 = 134,217,728
2^11 = 2,048                2^28 = 268,435,456
2^12 = 4,096                2^29 = 536,870,912
2^13 = 8,192                2^30 = 1,073,741,824
2^14 = 16,384              2^31 = 2,147,483,648
2^15 = 32,768              2^32 = 4,294,967,296
2^16 = 65,536

2^64 = 18,446,744,073,709,551,616

How can I read the 64th power of 2 in English?
I cannot even read this even in Korean. :(

What can you tell me about yourself?

I got an e-mail from the english study web site.
They send commercial e-mail periodically. It is commercial but it is good for the study because they introduce some useful sentences. The conversation below is also from that e-mail, and I want to remember a sentence in the conversation.

A: I’d like to get to know you better. What can you tell me about yourself?
B: What’s there to know? I’m an ordinary guy just like somebody you’d dump into on the street.
A: There must be something about you that sets you apart from the crowd.
B: Well, believe or not, I’m quite the snowborder. I hit the slopes several times a year.

It is so memorise worthy sentence.

How to check the duration how long a ARP cache entry is maintained on Linux

The MAC address information obtained from the ARP reply is maintained in the neighbor cache (also called arp cache). The information in the arp cache can be read with the command "arp -a".

Normally, this information is maintained for 60 seconds according to "http://www.superuser.co.kr/home/lecture/files/sbHong/arp_sniffing.pdf".
This values also can be checked and configured using the command "sysctl".

Check this out.
# sysctl -a | grep gc_stale_time

The command "sysctl" is to configure kernel parameters at runtime. The parameters available are listed under /proc/sys/.

If you don’t know the usage, just type "sysctl", or read the web site "http://linux.about.com/library/cmd/blcmdl8_sysctl.htm".

Configuration VIM

I alway forget about this.  After reinstallation of the OS, everytime I start coding, I search how to turn on the style.

So, I write this. Just type “:syntax on”.

Damn, I have an eraser in my brain.

——-

The configuration file for vim is in “~/.vimrc “.

TBD

TBD means “To Be Determined”

WTF!!

screen command on linux

screen -S session_name
screen -r session_name
screen -list
screen -D -RR screen_name

Ctrl+a, c: Create new screen
Ctrl+a, a: Change to previous screen
Ctrl+a, 0: Change to the screen ‘0′
Ctrl+a, 1: Change to the screen ‘1′
Ctrl+a, 2: Change to the screen ‘2′
Ctrl+a, d: Screen detach

Ctrl+a, [: Change to Copy mode
Ctrl+a, ]: Print the contents in the buffer

Ctrl+a, K: Kill the current page

Referenced from <http://www.hurryon.org/index.php/nix_screen>

[Simple way to use]

1. Type ’screen’ on shell

2. Type ‘Ctrl+a, c’ to make new screen

3. Type ‘Ctrl+a, a’ to change to the previous screen

export LANG=c

When I work with terminal, some words such as between quotation marks represents with strange letters.

“$>export LANG=c” solves this problem.