원문은

http://bittalk.org/threads/22777/



평소 다운로드나 시딩 자체는 잘 되는 것 같은데 (이게 안된다면 이 글에서는 해결해드릴 수 없습니다;;)

어째 swarm 수에 비해 연결이 잘 안된다고 느끼신 적이 있나요.

왓시디에서 업로드는 내가 했는데 두번째 시더가 된 넘이 이후 업로드를 다 먹어버려서 속상하신 적이 있나요.

원래 시더 수가 한 자리 정도면 다음과 같이 peer swarm 대부분과 연결되어 있어야 정상인데요.

[IMG]

(괄호 앞에 있는게 연결된 peer 수, 괄호 안에 있는게 전체 peer 수입니다)

peer 윈도우에서 연결이 어째 되는 듯 하다가 계속 끊어지는 것이 보인다면 십중팔구 이유는 이것입니다.

Peer 까지의 연결 경로 사이의 어떤 라우터가 '토런트 연결을 차단한다' 라는 감시 기능을 켜놓고

연결이 토런트인게 확인되는 족족 끊어버리거나 속도를 팍 낮춰 버리기 때문이죠.

특히 해외쪽 라우터에 이런 그지같은 차단 설정이 많이 돼있는데... -_-

다행히 이걸 회피할 방법이 있습니다.

[IMG]

프로토콜 암호화를 '있음' 으로 설정하시면 고민 끝.

토런트로 주고 받는다는 것이 발각되지 않도록 연결을 암호화해서, 가능한한 연결이 실패하지 않도록 해줍니다.

그럼 이걸 켜면 무조건 좋으냐.. 하면, 그건 아니고, 대신 CPU를 조금 더 잡아 먹는게 단점인데요.

(그래서 디폴트가 '없음' 이죠)

뭐 워낙 uTorrent가 사양을 안타는 편이라, 대부분의 경우 문제는 없을 거라고 생각됩니다.

해외 트래커 많이 사용하시고, 킴수피와 경쟁하시는 분들께는 필수 설정입니다.

ps. 가끔 설정을 '있음'으로 해도 연결이 안되는 Peer가 있는데, 이럴 때는 '강제'로 설정하시면 연결이 되기도 합니다.
다만, 이걸 '강제'로 해두면 암호화 안하는 Peer와는 연결이 아예 안되기 때문에 오히려 최대 연결 가능한 Peer 수는 줄어든다는 점을 주의하세요.



,

E-cfg 이라고 실행하면 바로 IP 주소와 MAC 주소를 보여준다.

 

 

 

 

E-IPConfig.exe

 

,

javascript 를 읽기 전에 페이지가 로딩되어야 브라우저에서 빠르게 렌더딩해서 결과를 보여준다.


jquery 등 대부분의 javascript 는 비동기식으로 로딩이 가능하다.




<script type="text/javascript">

 // Add a script element as a child of the body

 function downloadJSAtOnload() {

 var element = document.createElement("script");

 element.src = "YOURJAVASCRIPT.JS";

 document.body.appendChild(element);

 }


 // Check for browser support of event handling capability

 if (window.addEventListener)

 window.addEventListener("load", downloadJSAtOnload, false);

 else if (window.attachEvent)

 window.attachEvent("onload", downloadJSAtOnload);

 else window.onload = downloadJSAtOnload;

</script>



아래는 google.com 의 원문

https://developers.google.com/speed/docs/insights/BlockingJS


Defer loading of JavaScript

In most cases, the bulk of the JavaScript code handles user-initiated events, such as mouse-clicking and dragging. All of these user-triggered events occur after the page is loaded and the onload event is triggered. In order to defer loading of these JavaScripts insert a JavaScript event listener in the head of the containing document that forces the external file to be loaded after the onload event. We recommend adding a very simple scripted DOM element. Here’s an example, where deferredfunctions.js contains the resources that need to be deferred:

<script type="text/javascript">
// Add a script element as a child of the body function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "deferredfunctions.js"; document.body.appendChild(element); }
// Check for browser support of event handling capability if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload;
</script>


,

table_name / field_datetime 부분만 바꾸면 된다.


SELECT * FROM `table_name` WHERE `field_datetime`>=(CURDATE()-INTERVAL 3 DAY);


,

apache 에서 http 를 compression 하기 위해서 사용하는 mod_deflate 사용법.


1)

http.conf 에


LoadModule deflate_module modules/mod_deflate.so


<ifModule mod_deflate.c>

    <filesMatch "\.(js|css|html|php)$">

        SetOutputFilter DEFLATE

    </filesMatch>

# Netscape 4.X has some problems

        BrowserMatch ^Mozilla/4 gzip-only-text/html

 

# Netscape 4.06-4.08 have some more problems

        BrowserMatch ^Mozilla/4\.0[678] no-gzip

 

# MSIE masquerades as Netscape, but it is fine

        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</ifModule>



추가한다.



2)


http://www.whatsmyip.org/http-compression-test/


에서 테스트 해본다.

,

1) 영문판

SetupConsumerC2ROLW-en-us.exe


2) 한글판

SetupConsumerC2ROLW-ko-kr.exe


3) 참고로 파워포인트 뷰어

http://www.microsoft.com/en-us/download/details.aspx?id=13


,

15 년전에 윈도우 파일 시스템 등을 연구하면서 생각해 놓은 것을 적는다.


일반적으로 백신은 프로그램의 10 bytes 정도 특정 패턴 코드를 가지고 잡아내게 된다.


이것을 회피하는 방법에 대한 아이디어가 대학교 1학년 때 생물 수업을 듣는 중 생각났다.


DNA 구조에서 exon 과 intron 이 존재하는데 intron 은 버려지고 exon 만 남게된다.


프로그램도 역시 쓸데없는 trash code 가 사이사이에 존재하면 백신은 프로그램을 잡을 수 없다.


trash code 는 어셈블리어로 레지스터 push, pop 을 반복하던지. jump 를 반복해도 가능하다. 더하기 빼기를 반복해도 된다.


프로그램 전체를 exon , intron 구조로 만들기는 너무 복잡하고 현실적으로 불가능하지만


간단한 loader 는 exon 과 intron 구조로 만드는 것은 가능하다.



exon & intron 구조화된 loader + 암호화된 내부 core 이런 구조를 갖추면 된다.



내부 core 는 다시 복제할 때 loader 의 exon, intron, 암호화 방식을 약간만 바꾸어주면 똑같은 프로그램이지만 백신으로 잡을 수가 없다.

,

회사에서 업무 시간이 정해져 있다면 업무시간에는 진동 또는 무음으로 휴일에는 벨소리로 전환하면 좋지요.


timeriffic 은 이런 과정을 자동으로 해주는 app 입니다. 안드로이드용입니다.


3가지 스케줄을 설정할 수 있는데요.


저는


1) 평일 업무 시간 10시 ~ 7시 무음, 이후 벨소리

2) 토요일 9시~4시 무음, 이후 벨소리

3) 잠자는 시간대 12~6시 무음, 무진동


이렇게 3가지 셋팅으로 profile 을 만들어서 쓰고 있습니다.



https://play.google.com/store/apps/details?id=com.alfray.timeriffic&hl=ko


,

Visual Studio 에서 임시 파일 제거하기 위한 레지스트리입니다.


인터넷에서 발견한 것에서 .lib 파일까지 삭제하도록 추가하였습니다.



Delete_Temporary_Files_for_SVN.reg


,

deltacopy 다운로드


DeltaCopy.zip


## deltacopy server 는 저장소이고

## deltacopy client 는 자료를 보내주는 곳이다.



윈도우에서 사용할 때에는



1. 방화벽, 포트포워드 체크

2. 퍼미션 문제 해결 -> 아래 참조.




## deltacopy 나 rsync 로 작업을 하면 퍼미션이 SYSTEM 으로 잡혀있어서 수정이 어렵다.



이를 해결하기 위해서는


1. 암호가 있는 사용자 계정 (adminstrator) 으로 deltacopy server service 를 실행해야 한다.


-> services / 서비스에서 사용자 계정으로 log on 등록


cf) 암호가 있는 계정이어야 한다. -> 계정에 암호 만들기 / user account

cf) 로그인시 암호 입력 안하기 / netplwiz



2. 기본적으로 deltacopy 에서 rw 권한만 준다. X 까지 주도록 옵션을 주는게 좋다. deltacopy option 에서


1) changes permissions on the server, read&write 옵션을 끈다.


2) additional parameter 에 아래를 입력


--chmod=a=rwX 

(읽기 쓰기 모두 권한 주겠다는 것)



이 방법이 복잡하다면 아래 그림에처럼 Fix file permission 을 실행해도 된다. 이 방법은 그 때 그 때 해야한다.

 



Question:

I am running into permission problems when accessing files copied through DeltaCopy Server.
Answer:One very important thing to remember is the DeltaCopy uses rsync in the background, which came from UNIX. Therefore, the concept of ACL on Windows does not translate very well with Linux/UNIX. This causes some permission problems when using DeltaCopy.

Work Around

To avoid any permission problems, run the DeltaCopy Server Service under the Administrator's account rather than System account. Go toWindows Control Panel/Administrative Tasks/Services, select DeltaCopy Server service and go to Properties. Select the "Log On" tab and specify Administrator as the login name.

Every copied file on the server machine will be owned by the user who runs the DeltaCopy Server Service. Therefore, using Administratorwill allow the admins to access these files.

What happens if I already have used the System Account

Quite often users use the Built-in System Account initially and then switch the user at a later time. In this case all files that were copied under the System Account will be owned by "System Account" and no one else will have permission to access them. In that case follow the steps below.

If you are running an older version of DeltaCopy, you might not have this "Fix File Permissions" menu item. In that case you will have run the following command in CYGWIN to change the ownership.

chmod 777 *.*


,