• [React] life-cycle method

    life-cycle 메소드 순서

    컴포넌트를 생성 할 때

    constructor -> componentWillMount -> render -> componentDidMount
    

    Read on →

  • [js] 일반함수와 화살표함수에서 this 의 차이점

    Point.

    화살표 함수에서 사용된 this 참조는 해당 함수가 정의될 당시의 컨텍스트를 참조한다. function 함수에서 사용된 this는 해당 함수가 어떤 객체의 메소드로 호출되었느냐에 따라 해당 객체를 가르키는 참조가 된다.

    Read on →

  • [linux] 주요 명령어

    현재 폴더 용량확인

    $ du -hs
    


    특정폴더 용량확인

    $ du -hs foldername
    


    하위 폴더별 용량확인

    $ du -h --max-depth=1
    
  • [mongoDB] 자동 백업

    backup.sh 작성

    #!/bin/sh
    mongodump -h 127.0.0.1 -u root -p xxxx -o /home/ec2-user/dbbackup/dump_$(date +%y%m%d-%H%M)
    

    Read on →

  • [express] https 세팅

    private key 생성

    $ openssl genrsa 1024 > key.pem
    Generating RSA private key, 1024 bit long modulus
    ............................................++++++
    ............................................................++++++
    e is 65537 (0x10001)
    $ cat key.pem
    -----BEGIN RSA PRIVATE KEY-----
    MIICXQIBAAKBgQDyjJcALHArMrTK1j67ZjZhW55r9vxHKw7VmFWksYSGkXsiu4kA
    V4Um9xDqGw3Ghpur4X9V1qU6qp83IcNSSQ4UES9HtTGjMTlSCeIugdPKB2KYOzz8
    qVG/bRIoviVaqNdKNk4ICUttxdfxG7GsmA7fW+JEkDi2ZdtbUEkQYJ5YdQIDAQAB
    AoGALm+SHTtkwjB0An1gBzq7YIpM2ziu9eUdcvE2PFCsIaNKosyqnwEigeI9P8Ss
    L3zn4taKMqHkgkXWM5ToMyG/auKuIFeFqiStM6r9pOn99JVU84mmaqG4wfQFT1m/
    pBpZ1ZbiWlTz14FrsK6PejvPA6qoJgNLL0SDHqJiuPJWoOECQQD9XXkWhRKZMgm3
    obbFB4SDh3YE01yPXRyYkMvQbTRnq92gffXrprga/Jalhq2DPg+Hkl4xR6+1mKcb
    209s7n0ZAkEA9RJSZDK5Jgx1OZkpqVs0iJ6UUNsvL9HqkpOyrrGaXqyOyW8r0VTh
    9SQwMtGNeFFC3qkMbzfq0uW+WvaXfb6FvQJAd0IIP6FmL7Xd3RHBdfyT41Vft+XF
    K7YoP6foR7Mfd6zuJR0lJEbVYd6CsAc0pRIRPT8oFwonKtMv1WzldeDMAQJBAIIv
    T3FGuLALoiIMyOLcPlXs16D0Lmbavh9LMno2gmiUhe1fjwlObBILPUdhpiMqF7ms
    V5yikbeir7ImmGcF1IkCQQChTL6TXGbPmQZQvT/mIygIeCF4JYR2G4tnDsdPkvRi
    BduVNDzKkBk/8AvfqAxWEARL9QX5jVx3LsfmtpsABvqC
    -----END RSA PRIVATE KEY-----
    $ ls -al
    total 80
    drwxr-xr-x   9 sm  staff    288  7  9 12:40 .
    drwxr-xr-x  20 sm  staff    640  7  4 11:08 ..
    -rw-r--r--   1 sm  staff    887  7  9 12:39 key.pem
    $ 
    

    Read on →