반응형

리눅스는 이전에 명령들을 기억합니다.

shell > history

를 치면 이전에 입력했던 명령어들이 나타납니다.

실행했던 명령어 리스트중 어떤 명령어를 실행시키고 싶으면 다음과 같이 합니다.

shell > !번호

를 입력하면 그 번호의 명령어를 실행합니다.

반응형
반응형

이클립스에서 STS를 설치하고, Spring 프로젝트를 생성하고나서 


src/main/resources 폴더에 새로운 폴더를 추가하면, 당연히 폴더 아이콘으로 보여야하는데, 패키지로 보이는 


경우가 있습니다. 




아니! 나는 폴더를 생성했는데, 시방 무슨 패키지가 생성되었어?!?! 라고 생각하시면서, 내가 잘못했나?

다시 해볼까? 하시면서 몇번을 만들어도 똑같을 겁니다.


사실 이건 정상적인 상황으로 실제 프로젝트에는 문제가 없지만, 좀 찜찜하고 눈에 거슬리기도 합니다.

이럴때는 다음과 같이 설정하시면 됩니다.


1. 프로젝트 우클릭 -> Properties


2. Java Build Path -> Source 선택


3. 하단에 있는 /src/main/resources의 Excluded를 선택하고 Edit



4. Exclusion patterns의 Add를 선택하고 ** 를 입력


5. Finish

그럼 다음과 같이 폴더 형식으로 보입니다.


해결 완료!

반응형
반응형

SSL인증서를 적용한 이후 웹서버 시작시에 암호를 묻는 경우가 있다.

아래처럼 진행해서 nokey 처리를 하면 된다.

 

# openssl rsa -in 기존KEY -out 생성KEY

 

물론 기존 key 파일은 백업을 먼저 해두자.

반응형
반응형

public static String getClientIpAddr(HttpServletRequest request) {

String ip = request.getHeader("X-Forwarded-For");

if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {

ip = request.getHeader("Proxy-Client-IP");

}

if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {

ip = request.getHeader("WL-Proxy-Client-IP");

}

if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {

ip = request.getHeader("HTTP_CLIENT_IP");

}

if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {

ip = request.getHeader("HTTP_X_FORWARDED_FOR");

}

if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {

ip = request.getRemoteAddr();

}

return ip;

}

 

반응형
반응형

이번에 친구랑 일본을 가게되서 포스팅..

다음에 갈일 또 있을때 참고하기 위해서~

 

URL : http://www.seoulbus.co.kr/index/airportbus_01_1.php?val=10 

 

2016.07.15 기준

 

 

반응형
반응형

리눅스에서 파티셔닝된 하드를 윈도우 사타케이블에 꽂았을때 불러오지 못할 수 있다.

그럴떄 사용하는 툴!

 

ext2explore-2.2.71.zip

 

반응형
반응형

The link above provides detailed explanation with screenshots. It also has some other simple methods that could be tried before doing this manually. Since it is not accessible from some regions let me describe the method that worked for me.

  1. Go to the OpenPGP Public Key Server. There you can enter your key into the Search String field, leaving everything else as is, then click "Search!".
    When searching for a key, always prepend 0x to it! This means that, for example, you have to search for 0x6AF0E1940624A220 instead of 6AF0E1940624A220.
  2. Click on the link provided in the pub section. This should take you to page containing the key. The page's heading should be similar to Public Key Server -- Get "0x6AF0E1940624A220"
  3. Copy everything from underneath the title (starting from -----BEGIN PGP PUBLIC KEY BLOCK-----) and save it in a file (e.g. key1).
  4. Once you have the file, run the following command

    sudo apt-key add key1
    

You will get an "OK" response.

And you are done. Repeat the procedure of other keys that might be missing.

 

 

에러메시지에 보면 마지막 PUBLIC KEY 하고 뒤에 키값이 나온다....

OpenPGP Public Key Server 링크 클릭 후 그 키 값 앞에 0x 를 붙여서 검색..

그리고 나온 링크를 클릭하면 key 값이 나오는데 그걸 복사해서 저장한다.

그리고 sudo apt-key add 키파일명 을 해주고 apt-get update 를 다시 실행.

반응형
반응형

vim 에서
     vim에서는 dos mode의 화일을 읽어도 화면에 ^M을 표시하지 않습니다.
     대신 밑에 [dos] 라고 나타납니다.
     다음과 같이 해서 unix mode로.. 즉 ^M을 빼는것입니다.

     :set fileformat=unix

     반대로 unix mode에서 dos mode로 바꾸고 싶다면

     :set fileformat=dos

반응형

+ Recent posts