SSamTure.net

워드프레스

아파치 최대접속자 수 계산

아파치 프로세스당 물리적 메모리 사용량을 확인한다. cat /proc/PID/status 에서 VmHWM의 평균을 확인 하고 (전체 메모리 용량 – 서버 기본 사용 용량) / 아파치 프로세스 메모리 사용량 평균

Ubuntu Apache Tuning

출처 : http://www.mistcat.com/ So I recently needed to do a little quick performance tuning at work on one of our ubuntu server installs.  I’ve been using some of the wisdom found here to refresh myself on the basics, and I wrote a quick little one line awk script to give me the total amount of […]

[iPhone]scrollView position 선택

CGFloat position =  320.0f; [scrollView setContentOffset:CGPointMake(position, 0.0f) animated:YES];

[Android] WebView에 플레이어 연결

Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url), “video/mp4″); view.getContext().startActivity(intent); return true;

[iPhone]다른 클래스 멤버 접근 예)

FirstViewController *firstView = [appDelegate.tabBarController.viewControllers objectAtIndex:0];

HTML DTD

HTML 2.0 표준 문서 형식 <!DOCTYPE html PUBLIC “-//IETF//DTD HTML 2.0//EN”>  HTML 3.2 표준 문서 형식 <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final//EN”>  HTML 4.01 표준 문서 형식[Strict, Transitional, Frameset 순] <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”> XHTML […]

[objective-c]timestamp 관련

NSTimeInterval timeStamp = 1282093277; NSDate* date = [NSDate dateWithTimeIntervalSince1970:timeStamp]; NSLog(@”date=%@”, date); // date=2010-08-18 10:01:17 +0900

[objective-c]형 변환

int -> String int 정수형 = 3; NSString *스트링 = [NSString stringWithFormat:”%d”, 정수형]; String -> int int 정수형 = [스트링 intValue];

[objective-c]공백 제거

string = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];

mencoder libfaac 에러 날때 참고

Adding the Repository The following bash command adds Medibuntu’s repository to Ubuntu. It also adds Medibuntu’s GPG key to your keyring, which is needed to authenticate the Medibuntu packages. This command should be run in the Terminal (Applications → Accessories → Terminal): sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get […]

[정규식]element 안에 내용 가져오기

(.+?) 또는 ([sS]+?)

JS 터치이벤트

[이벤트] touchstart touchend touchmove touchcancel [프로퍼티] touches : 복수로 화면에 터치되는 각 손가락들에 대한 터치 이벤트 모음들. 이 객체들은 페이지에 터치되는 좌표의 값을 가지고 있음. targetTouches : 전체페이지가 아닌 타깃 요소만 [예제] window.addEventListener(‘load’,function(){    var b = document.getElementById(‘layer1′);    b.addEventListener(‘touchmove’,function(event){       alert(‘mousemove’); },false);

Content Delivery for Mobile Devices

In the past, delivering content to mobile devices has been a very tricky subject. Developers who came into the mobile world were usually confronted with a new and unknown paradigm, where very little information could be found on how to determine devices’ capabilities and to deliver content to them. It was something completely new, and […]

리눅스 특정 파일 삭제 명령어

//수정한지 365일이 지난 jpg파일 삭제 #find ./ -mtime +365 -name “*.jpg” -exec rm -r {} ; //접근한지 365일이 지난 jpg파일 삭제 #find ./ -atime +365 -name “*.jpg” -exec rm -r {} ; //수정한지 365일이 지난 크기가 0인 파일 삭제 #find ./ -mtime +365 -name -empty -exec rm -r {} ;

워드프레스 언어팩(mo파일) 수정 방법

오늘은 워드프레스 언어팩 수정하는 방법에 대하여 포스팅 하도록 하겠습니다. 워드프레스에서 기본적으로 번역된 언어팩을 제공하지만 그대로 사용하기에는 자신에게 맞지 않은 번역문들이 있을겁니다. 워드프레스에서 언어팩 디렉토리(/wp-content/languages/)로 가보면 확장자가 “.po”와 “.mo”파일이 있습니다. “.po”파일을 수정하여 “.mo”파일을 생성하게 되는데요. 참고로  “.mo”파일은 직접 수정할수는 없습니다. “.po”파일을 수정하기 위해서는 “po에디터“라는 툴이 필요합니다.