SSamTure.net

워드프레스

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 {} ;

Function Reference/wp mail

Description Sends an email. Usage    Parameters $to (string) (required) The intended recipient(s) of the message. Default: None $subject (string) (required) The subject of the message. Default: None $message (string) (required) Message content. Default: None $headers (string) (optional) Mail headers to send with the message. (advanced) Default: Empty $attachments (array) (optional) Files to attach. (advanced) […]

.htaccess를 이용한 virtualhost 설정 법

대부분 웹서비스를 운영할때, 개인 서버를 가지고 운영하지 않고, 호스팅업체를 이용하여 운영 할것입니다. A라는 웹서비스 이외에 B라는 웹서비스를 운영하고싶을때, 아파치설정(httpd.conf)에서 가상호스트를 추가해주면 쉽게 운영할 수 있지만, 호스팅업체에서 제공해주는 서버에서는 해당 파일의 수정이 불가능 하죠. 이럴때는 웹서비스 디렉토리 최상위 루트에 .htaccess를 추가해줌으로써 가상호스트를 추가해 줄 수 있습니다. 대신의 해당 서버가 mod_rewrite를 지원해야합니다. 다음의 .htaacess의 예제 내용은 test.ssamture.net이라는 […]

[objective-c]stringByReplacingOccurrenceOfString

NSString *x = @”hello world”; x = [x stringByReplacingOccurrenceOfString:@”world” withString:@”cheese”];

MySQL INDEX

특정 열의 빠른 조회 를 위해서 인덱스를 사용합니다. 하지만 많은 인덱스를 걸어주는 것 보다는 가장 적절하고 효율성 있게 인덱스를 사용하는것이 중요합니다. 인덱스에 대해서 알아보도록 하겠습니다. MySQL 인덱스는 PRIMARY KEY, UNIQUE KEY, INDEX, FULLTEXT 를 지원하고 있습니다. 저장 방식은 B-Tree 로 저장이 됩니다. 우선 B-Tree 에 대해서 간단하게 알아보겠습니다. B-Tree (출처 : CCL : Wikipedia B […]

WordPress 3.0 Release Candidate

As Matt teased earlier, the first release candidate (RC1) for WordPress 3.0 is now available. What’s an RC? An RC comes after beta and before the final launch. It means we think we’ve got everything done: all features finished, all bugs squashed, and all potential issues addressed. But, then, with over 20 million people using […]

[Linux] MP4에 실시간 재생 가능하도록 변경하기

gpac를 설치 후 #MP4Box -isma xxx.mp4

[ubuntu] rpm->deb , deb->rpm 패키징하기

rpm->deb : alien -d xxxx.rpm deb->rpm : alien -r xxxx.deb

Couldn’t find video filter ‘x264′

x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License. x264 itself provides a command line interface as well as a library-level interface. x264 is used to encode video files in mp4, m4v, h.264 (HD) output format. Install […]

다수 웹서버에서 PHP 세션 공유

L4, LVS, DNS RR 등으로 여러대의 웹서버를 운영하다보면 늘 고민하게 되는게 세션 공유일 것 같다. 물론 L4의 Metric 중에 Hash를 이용하면 어느정도 해결 될 수 있는 문제이지만, 가끔 클라이언트가 다른 서버로 세션이 할당되는 경우를 볼 수 있다. 나 또한 이 문제로 많은 고민을 했고, 여러 많은 HOW를 보았지만 썩 마음에 드는것이 없었다. 아마 세션 공유를 […]

[C언어] 파일 사이즈 구하기

#include<stdio.h> #include<string.h> void main(){  FILE *fp;    fp = fopen(“/home/ssamture/test.txt”,”r”);  fseek(fp, 0l, SEEK_END);  printf(“%ld byte n”, ftell(fp); }