echo '{"one":1,"two":2}' | python -mjson.tool


set -e

bash script 실행중 에러 발생시 즉시 종료( 자세한 내용은 manpage 참조 )


man bash

...

SHELL BUILTIN COMMANDS

...


       set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...]

       set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]

...

              -e      Exit  immediately if a pipeline (which may consist of a single simple command), a list, or a compound command (see SHELL GRAMMAR above),  exits with a non-zero status.  The shell does not exit if the command that fails is part of the command list immediately following a while  or  until

                      keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following

                      the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !.  If a  compound  command

                      other  than  a subshell returns a non-zero status because a command failed while -e was being ignored, the shell does not exit.  A trap on ERR,

                      if set, is executed before the shell exits.  This option applies to the shell environment and each subshell environment separately (see COMMAND

                      EXECUTION ENVIRONMENT above), and may cause subshells to exit before executing all the commands in the subshell.


                      If a compound command or shell function executes in a context where -e is being ignored, none of the commands executed within the compound com‐

                      mand or function body will be affected by the -e setting, even if -e is set and a command returns a failure status.  If a compound  command  or

                      shell  function  sets  -e while executing in a context where -e is ignored, that setting will not have any effect until the compound command or

                      the command containing the function call completes.





require

sudo apt-get install vim ctags



vimconf.tar.gz


ref: http://pythoninreal.blogspot.kr/2013/12/virtualenv.html

ref: http://yong27.biohackers.net/373


설치:

sudo pip install virtualenv


프로젝트 생성:

virtualenv 프로젝트명

ex) virtualenv ar_project


이때, ar_project 폴더 생성후 python 기본 libs 가 복사됩니다.


해당 가상환경으로 들어가기:

. ar_project/bin/activate



프로젝트 패키지 목록:

pip freeze > requirements.txt


패키지 목록 설치:

pip install -r requirements.txt




설치

$ apt-get install python-setuptools

$ easy_install -U pip


기존에는 아래와 같이 간단히 'apt-get install python-pip' 를 사용했었는데, 에러 발생시 우분투에서 빨리 패치를 해주는것 같지 않다. 그래서 귀찮아도 위처럼 설치 하기로 결정~

ref: http://stackoverflow.com/questions/27341064/how-do-i-fix-importerror-cannot-import-name-incompleteread/27341847#27341847


or

$ apt-get install python-pip


(gdb) help generate-core-file

Save a core file with the current state of the debugged process.

Argument is optional filename.  Default filename is 'core.<process_id>'.

(gdb) generate-core-file


 kill -l

 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP

 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1

11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM

16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP

21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ

26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR

31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3

38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8

43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13

48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12

53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7

58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2

63) SIGRTMAX-1  64) SIGRTMAX


kill -STOP pid

kill -19 pid



gdb program_name `pidof program_name`




kill -CONT pid

kill -18 pid





kill -STOP `pidof RFTS`

gdb RFTS `pidof RFTS`

$ generate-core-file

kill -CONT `pidof RFTS`



참고: http://blog.naver.com/redwave102?Redirect=Log&logNo=80115557491

ps.http://blog.naver.com/theparanbi?Redirect=Log&logNo=80115538857

1. java se 설치
   JAVA_HOME 설정 C:\Program Files\Java\jdk6
   JRE_HOME 설정 %JAVA_HOME%\jre
   PATH 에 bin 추가
  CLASSPATH 에 tools.jar 추가

2. eclipse .. java EE 버전으루..

3. android sdk 설치 PATH 에 tools 추가
4. android ADT 추가 ( in eclipse ) window >> Preference >> android 에 SDK location 지정
5. 그외 셋팅및 추가 tools download ( in eclipse )
http://linuxhelp.blogspot.com/2005/10/find-speed-of-your-ethernet-card-in.html

Find the speed of your Ethernet card in Linux

For logging on to the net or for attaching as a node on a LAN, your computer needs a network card. The network card forms the interface between your computer and the network. There are different kinds of network cards available in the market depending on its speed and other features. Here is a tip to find out the characteristics of your network card.

If you want to find what type of network card is used, its speed, on which IRQ it is listed, and the chip type used, you use the following command :

# dmesg |grep eth0
Here eth0 is the first network card. If you have additional cards, it will be named eth1, eth2 and so on. And here is the output of the above command :
divert: allocating divert_blk for eth0
eth0: RealTek RTL8139 at 0xd800, 00:80:48:34:c2:84, IRQ 9
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
divert: freeing divert_blk for eth0
divert: allocating divert_blk for eth0
eth0: RealTek RTL8139 at 0xd800, 00:90:44:34:a5:33, IRQ 9
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth0: no IPv6 routers present
...
The important things to note here are those highlighted in colour. As you can see from the above listing, my ethernet card is a RealTek RTL8139 chipset based card on IRQ 9 (Interrupt Request). Its speed is 100 Mbps and is a full-duplex card. And the link is up.

As is the philosophy of Linux, there is more than one way of finding the same information. Linux also comes with a cute sounding tool called mii-tool which can also be used to get the same information about your network card.
# mii-tool -v eth0
eth0: negotiated 100baseTx-FD, link ok
product info: vendor 00:00:00, model 0 rev 0
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD
10baseT-HD
...
Here -v is verbose mode. From the above listed output, one can see that the ethernet card is working as a 100baseTX, FD (Full Duplex) card which can work in the following modes :
  • 100 Mbps Speed (Full duplex or half duplex ) or
  • 10 Mbps speed (Full duplex or half duplex).
And it uses autonegotiation to bring up the link. You can call the above device as a 10/100 NIC.
Another tool which also does the same thing is ethtool. Try the following command on your machine to see the output.
# ethtool eth0

Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: p
Current message level: 0x00000007 (7)
Link detected: yes
Here full duplex, half duplex and auto-negotiation have the following meanings.
Full Duplex - Logic that enables concurrent sending and receiving. This is usually desirable and enabled when your computer is connected to a switch.

Half Duplex - This logic requires a card to only send or receive at a single point of time. When your machine is connected to a Hub, it auto-negotiates itself and uses half duplex to avoid collisions.

Auto-negotiation - This is the process of deciding whether to work in full duplex mode or half duplex mode. An ethernet card supporting autonegotiation will decide for itself which mode is the optimal one depending on the network it is attached to.
./configure  --enable-cscope --enable-multibyte

or

./configure  --enable-cscope --enable-multibyte  --with-features=big





  • using xterm clipboard
          install xorg-dev  xserver-xorg-dev
make distclean          <== 필요시

vim 에서
"+y
로 복사 가능



ps. 플러그인중 python 사용하는게 있을경우.
./configure  --enable-cscope --enable-multibyte  --with-features=big --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.5/config

파이썬 관련 dev 파일 필요 (header & library )



vim 설치된 곳은? ( :echo $VIMRUNTIME )

+ Recent posts