갤럭시S1 기본 음악 플레이어 디렉토리별 재생 edit

상단탭을 왼쪽으로 드래그하면 폴더별로 플레이가 가능하다.

Diable google picasa sync from android edit

http://www.google.com/support/forum/p/android/thread?tid=69b6774bbe77e236&hl=en

You can go to settings> applications and then on gallery clear data. This removes the picasa photos . Then don't sync picasa again. Worked perfectly for me.

Go to.
Settings> applications> manage applications> all> gallery> clear data

There is no option to un-check!

weechat nick alignment edit

weechat.look.prefix_align

description: prefix alignment (none, left, right (default))

type: integer

values: none, left, right (default value: right)

weechat.look.prefix_align_max

description: max size for prefix (0 = no max size)

type: integer

values: 0 .. 128 (default value: 0)

edit

http://todayis.tistory.com/276
우분투나 데비안에서 고정 ip를 설정하는 방법이다.
데비안의 경우 설치 시 ip를 설정할 수 있지만, 우분투의 경우는 DHCP로 잡히기 때문에.. 필요에 따라 다시 설정을 해 주어야 한다.

먼저 네트워크 인터페이스를 내린다(중지 시킨다).
$ sudo ifdown eth0

네트워크 인터페이스 설정 파일을 자신의 상황에 맞게 수정한다.
$sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcase 192.168.0.255
gateway 192.168.0.1
dns-nameservers 168.126.63.1 168.126.63.2

네임 서버를 수정한다.
$ sudo vi /etc/resolv.conf
nameserver 168.126.63.1
nameserver 168.126.63.2

네트워크 인터페이스를 올린다(다시 동작 시킨다).
$ sudo ifup eth0


ip 를 자동으로 할당받고 싶다면, '/etc/network/interfaces' 에서 iface eth0 inet static 이하의 부분을 iface eth0 inet dhcp 로 수정해 주면 된다.

우분투에서 MAC address 변경 edit

bayron.tistory.com/entry/우분투에서-MAC-address-변경
sudo vim /etc/network/interfaces


auto eth0
iface eth0 inet dhcp
hwaddress ether 00:00:00:00:00:00

노란색 부분에 원하는 MAC address 입력.


sudo service /etc/init.d/networking restart

MAC Address Generator


http://sqa.fyicenter.com/Online_Test_Tools/Test_MAC_Address_Generator.php

windows 7 네트워크 MTU 설정 edit

http://www.coolenjoy.net/bbs/cboard.php?board=32&no=2255

레지스터리로 하는법은
HKEY_LOCAL_MACHINE > System > CurrentControlSet > Services > Tcpip > Prameters > Interfaces 가셔서 요상한 이름의 폴더중 자신의 아이피속성이 들어가있는 폴더 선택 후
새로만들기 > DWORD 값 하시고 MTU라고 적으신 다음 원하시는 숫자 입력하시면 되지 않을까 합니다...

제가 아는 레지 수정방법은 XP에서 쓰던 방법이라.. 제대로 될진^^;;

cmd로 하는법은 netsh interface ipv4 set subinterface "로컬 영역 연결" mtu=XXX store=persistent

자신의 어댑터 이름을 로컬 영역 연결에 입력 해주시구요.. MTU자리에 숫자입력하면 간단하게 수정됩니다

ATI Catalyst Control Center 실행 안되는 문제 해결 edit

새로운 게임을 하느라 드라이버를 업데이트하였더니 딸려나온 까탈리스트 컨트롤 센터(CCC: Catalyst Control Center)가 실행이 안되는것이었다.
정확한 현상은 실행하면 하얀윈도우가 떳다가 바로 꺼져버린다.

왠지 찝찝하고 안티엘리어싱같은 옵션을 넣으려면 필요한데(나중에 알고보니 트레이아이콘에서도 설정가능하긴 함) 이게 왠 망발인가 구글링해서 해결방법 다 시도해봐도 안되고(어셈블 캐시를 지워보라는데(http://www.rage3d.com/board/showthread.php?t=33862974) 지우라는 키값도 없고..) 드라이버 클리너(http://www.drivercleaner.net/, http://noidsi.blog.me/10033800304)로 말끔히(그래도 찝찝하지만 64비트 인식함.) 지워보고 다시깔아도 안되고 미친다.

그런데 별 생각없이 트레이 아이콘에 오른쪽 마우스를 눌러서 Help도 눌러보고 About도 눌러봤는데 마침 About을 눌렀더니 .NET Framework 에러가 "...file does not conform to the expected file format specification..." 이런식으로 폰트파일이 고자라 한다.
구글링 해서 마이크로소프트 고객지원 페이지(http://support.microsoft.com/kb/937135)를 봤더니 폰트 캐시 어쩌고 저쩌고 하는데 폰트 캐쉬 서비스를 중지하고나서 캐시된 파일을 지운뒤 해당 폰트를 지우고 서비스를 다시 시작하면 폰트 캐시를 다시 하려니 싶어서 해당 폰트를 지우려고 봤더니 폰트가 없다.(-_-;; 제어판->글꼴에는 폰트들을 파일로 안보여주고 묶어서 보여주기때문에 문제가 있는 폰트는 보여주지 않았을것으로 추측함)

결국 파이썬 인터프린터로 윈도우즈에 폰트가 저장되어있는 디렉토리를 살펴보니 제어판->글꼴에선 보이지않던 .ttf파일이 os.listdir("c:\\windows\\fonts\\")로 보니까 멀쩡히 있더라. os.remove()로 제거하였다.
그 후 폰트 캐시 서비스들을 중지 후 캐시 파일을 제거하고 다시 시작한다음 까탈리스트를 실행시키니 실행이 된다.

까탈스럽네 거참..

ATI 드라이버 다운로드 페이지


Step 4까지 모두 선택해준뒤 다운로드해야한다. 자동 인식(Auto Detect)설치파일은 고자인듯.

http://support.amd.com/us/gpudownload/Pages/index.aspx

apache2 + php5 환경에서 큰 파일 업로드하기 edit

Apache2 + PHP5 환경에서 큰파일을 업로드할때 들어온 POST 데이터들을 모두 메모리에 넣은 뒤 tmp에 저장시킨다음 지정된 디렉토리로 이동하는줄 알고 큰파일을 업로드 시킬경우 메모리가 터져나가 안되는줄 알고있었는데, 다시해보니 잘못알고 있었다.

php.iniupload_max_filesizepost_max_size를 각각 2G씩 설정했을땐 아예 모든크기의 파일이 업로드되지 않았다.(큰 파일은 끝에서 멈춰버렸고 작은파일은 아예 진행이 안됨) 이유는 모르겠으나 추측하건데 POST 최대 크기값이 각 파일들의 크기값과 같거나 작아서(post_max_size <= upload_max_filesize) 그랬거나 단순히 2GG심볼을 이해하지 못해서 그랬을지도 모른다.(php 공식사이트엔 이해한다고 되어있다.)
http://php.net/manual/en/ini.core.php

PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.

Myth of 'memory_size'


이건 거의 미신수준이다.(하지만 구버전에선 어떤지 모르겠다.)

http://stackoverflow.com/questions/2854283/writing-direct-to-disk-with-php

I don't believe the myth that 'memory_size' should be the size of the uploaded file. The files are definitely not kept in memory... instead uploaded chunks of 1MB each are stored under /var/tmp and later on rebuild under /tmp before moving to the web/user space.

I'm running a linux-box with only 64MB RAM, setting the memory_limit to 16MB and uploading files of sizes about 100MB is no problem at all! (http://php.net/manual/en/features.file-upload.php)

PHP settings that related to file upload


php.ini:
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = /home/tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2000000000  ; about 1.86G

; Maximum size of POST data that PHP will accept.
post_max_size = 2147483648  ; 2G

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data

upload_tmp_dir


시스템 환경에 맞게 설정.

upload_max_filesize and post_max_size


업로드되는 각 파일의 최대 크기이며 post_max_size는 HTTP POST Request의 최대 크기이므로 post_max_size사이즈를 좀더 크게 설정.('multipart/form-data' is also POST Request)

max_execution_time and max_input_time


테스트해보진 않았지만 업로드할 파일의 크기가 매우 큰경우 timeout되어 업로드가 안될경우 늘려주면 될듯.

http://www.radinks.com/upload/config.php

These settings define the maximum life time of the script and the time that the script should spend in accepting input. If several mega bytes of data are being transfered max_input_time should be reasonably high.

Apache2(the webserver) LimitRequestBody option


Apache2 웹서버의 LimitRequestBody의 기본값은 0(무제한)이기때문에 따로 설정되어있지 않다면 만질필요가 없다.

http://www.radinks.com/upload/config.php

The apache webserver has a LimitRequestBody configuration directive that restricts the size of all POST data regardless of the web scripting language in use. Some RPM installations sets limit request body to 512Kb. You will need to change this to a larger value or remove the entry altogether.

Client side script Uploadify


http://www.uploadify.com/demos/

참고



구글링중 발견한 'Apache Commons Java 라이브러리/컴포넌트'는 Apache2 웹서버와 관계가 없다.


http://serverfault.com/questions/109557/best-practice-apache-file-upload

I think you're confusing Apache httpd (Web Server) with other Apache Group projects. Apache Group hosts the "Commons" project which a large collection of Java libraries for use in your own Java applications.

apache2 httpd 컴파일 옵션 지정


http://blog.naver.com/PostView.nhn?blogId=woodair&logNo=100090608241&parentCategoryNo=38&viewDate=¤tPage=1&listtype=0

raw 영상 , DVD 이미지 파일등 그 크기가 2기가 이상을 상회하는 파일들이 넘쳐나고 있는데 이와같은 파일을 웹을 통해 전송하기 위한 리눅스 컴파일 환경설정에 대한 내용입니다.

1. 커널 2.4 이상이어야 하며,
2. Apache2, PHP5 컴파일시 아래와 같은 컴파일 플레그를 지정함으로 2기가 이상의 대용량 처리 환경을 만들수가 있습니다.

shell] # CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
shell] # export CFLAGS
shell] # cd httpd-2.x.x
shell] # ./configure \
--prefix=/usr/local/apache2 \
--enable-mods-shared=all \
--enable-so
....
.... 

블로거에서 위키 마크업을 자바스크립트로 사용 edit

creole 말고도 수많은 자바스크립트 마크업들을 테스트해보았지만 모두 블로거에서 사용하기 적절하지 않았다.

  • 일반 HTML태그와 혼용 불가
  • <nowiki></nowiki>태그의 미지원 혹은 불완전한 지원
  • <pre></pre>태그안에서 줄바꿈을 인식하여 <p></p>로 감싼뒤 태그를 그대로 이스케이프하여 태그가 그대로 출력됨.

class이름으로 element를 얻기위한 getElementsByClass함수




위 함수 대신 jquery같은걸 써도됨.

아래 자바스크립트 소스들은 페이지 맨 하단에 삽입되어야 함.(페이지가 모두 로드 된 뒤 렌더링)

Creole




모든 포스트에 자동으로 위키마크업을 사용하려면 위 주석처리된 코드처럼 post-body entry-content클래스를 지정해주되지만 일반 HTML태그를 지원해주지 않기때문에 wiki-content클래스를 지정하여 위키마크업을 사용할 부분에만 사용한다.

wiky






InstaView by Pilaf from wikipedia



Firefox HTTP 301 redirected permanent update edit

Javascript document.location edit

http://fuckthis.com/shit

  • document.location -> http://fuckthis.com/shit
  • document.location.hostname -> fuckthis.com
  • document.location.pathname -> /shit

Firefox page captures sometimes fail with an "out of memory" error temporary fix edit

https://addons.mozilla.org/en-US/firefox/addon/pagesaver/

Note: we are aware of a problem where, on some Windows systems, page captures sometimes fail with an "out of memory" error. This is caused by a Firefox bug that has been fixed; the fix should be included in Firefox 8. In the meantime, please refer to the Known Issues and Limitations for more information including a temporary workaround for this problem.

http://pearlcrescent.com/products/pagesaver/doc/#knownissues

With Firefox 4 and newer on some Windows systems, attempts to capture a page that is taller or wider than 8,192 pixels may fail and an "out of memory" error will be reported. This is caused by Mozilla bug 649924 which occurs when hardware acceleration is used. To work around this problem, follow these steps to disable hardware acceleration:

  1. Open the Firefox options and view the Advanced panel.
  2. Within the General tab (Browsing section), uncheck the Firefox option named "Use hardware acceleration when available".
  3. Restart Firefox.

Uncheck the Firefox option named "Use hardware acceleration when available":


배컴2 피시방 플레이 edit

이 팁은 EA코리아에서 바로 구입한 분들에게만 적용될겁니다.

  • 인증횟수는 자신의 시디키에 종속됩니다. (즉 다른사람의 설치파일로 설치하여도 자신의 시디키의 인증횟수가 감소됩니다. *설치파일이 마구마구 뿌려져도 문제없음)
  • 시디키는 EADM의 게임정보에서 복사한다음부턴 EADM없이도 설치파일에 직접 시디키를 입력하여 바로 설치가 가능합니다.
  • 시디키는 레지스트리에 암호화되지 않은 상태로 저장됩니다.

EADM에서 설치파일 받으려면 속 터집니다.

  1. 일단 EADM에서 베컴2 게임정보에 보면 시디키가 나와있습니다. 다른곳에 소중히 간직하세요. (시디키가 곧 게임값)
  2. EADM에서 설치파일을 다 받고 그 디렉토리만(bfbc2_dd) USB메모리스틱이나 외장하드에 백업하시거나 피시방 컴퓨터에 백업하실 수 있으신경우 백업합니다.
  3. 패치도 설치 후 업데이터로 패치하면 속 터집니다. 패치도중 오류도 자주 나구요. 메뉴얼 패치파일도 같이 백업해둡니다.

R10 최신 메뉴얼 패치

http://www.bigdownload.com/games/battlefield-bad-company-2/pc/battlefield-bad-company-2-r10-update/

이 후 부터는 EADM없이 설치하실때(bfbc2_dd\Setup.exe) 보관해둔 시디키를 입력하고 바로 설치가 가능합니다.

설치 완료 후 펑크버스터 업데이트와 동시에 메뉴얼패치를 진행할 수 있습니다.

펑크버스터 메뉴얼 업데이트 pbsetup.zip

게임을 다 즐긴 후 삭제를 프로그램 추가/제거에서 하면 속터집니다.

시작메뉴의 Deauthorize로 인증을 풀어주신 후 시디키정보가 들어있는 레지스트리를 삭제하신 후 바로 나가시면 안전합니다.

시디키 레지스트리 삭제

레지스트리 편집기에서 HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\Electronic Arts\Battlefield Bad Company 2\ergc 의 값을 지우시거나 아래 내용을 빈 텍스트 문서에 복사한 후 확장자를 .reg로 변경한 후 실행시켜줍니다.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\Electronic Arts\Battlefield Bad Company 2\ergc]
@=-

만약 인증전에 레지스트리에있는 시디키를 지우셨다면 Deauthorize를 할 수 없습니다.

이때에는 다시 시디키 정보를 ergc에 입력하신 후 Deauthorize하시면 인증을 풀 수 있습니다.

레지스트리의 시디키 삭제후에도 걱정되시는분은 게임폴더(C:\Program Files\Electronic Arts)를 Shift+Delete키로 지워버리세요. :)

Javascript getElementsByClass edit

http://jsnu.cafe24.com/lagooniweb/-web-technology/js-javascript/

function getElementsByClass(searchClass,node,tag) {
    var classElements = new Array();
    if ( node == null )
        node = document;
    if ( tag == null )
        tag = '*';
    var els = node.getElementsByTagName(tag);
    var elsLen = els.length;
    var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)');
    for (i = 0, j = 0; i < elsLen; i++) {
        if ( pattern.test(els[i].className) ) {
            classElements[j] = els[i];
            j++;
        }
    }
    return classElements;
}

XML online escape encoder/decoder edit

Encoder: http://www.opinionatedgeek.com/dotnet/tools/htmlencode/encode.aspx
Decoder: http://www.opinionatedgeek.com/dotnet/tools/htmlencode/decode.aspx

Block search bots using meta tag edit

http://code.google.com/intl/ko/web/controlcrawlindex/docs/robots_meta_tag.html

Add below code inside of head tag:
<meta name="robots" content="noindex, noarchive, nofollow, nosnippet, noodp, notranslate, noimageindex">
<meta name="googlebot" content="noindex, noarchive, nofollow, nosnippet, noodp, notranslate, noimageindex">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">

Adding SyntaxHighlighter to blogger edit

SyntaxHighligher: http://alexgorbatchev.com/SyntaxHighlighter/

I have a problem if i use higher version than 2.0.320.

Design -> Edit HTML

Add below code between ]]></b:skin> and </head>
...
]]></b:skin>

<link href='http://alexgorbatchev.com/pub/sh/2.0.320/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/2.0.320/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCpp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCSharp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCss.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushPhp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushPython.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushRuby.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushVb.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushPerl.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushBash.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushPlain.js' type='text/javascript'/>

</head>
...

Add below code before </body>
...
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.stripBrs = true;
SyntaxHighlighter.config.clipboardSwf = &#39;http://alexgorbatchev.com/pub/sh/2.1.364/scripts/clipboard.swf&#39;;
SyntaxHighlighter.all();
</script>

</body>
</html>

Using libcurl in libpurple edit

http://pidgin.im/pipermail/devel/2007-November/003967.html
Vishal Rao vishalrao at gmail.com
Tue Nov 6 01:08:27 EST 2007


Hello,

I'm writing a libpurple plugin (cross-platform Windows and Linux/Unix)
and I need to do an FTP upload via code. Can you recommend some
quick/easy library to do an FTP upload which also compiles/works on
Windows and Linux?

Thanks,
Vishal Rao

--
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."

http://pidgin.im/pipermail/devel/2007-November/003968.html
Casey Harkins caseyharkins at gmail.com
Tue Nov 6 01:41:18 EST 2007


libcurl perhaps? Never used it, so I'm not sure about quick/easy, but it
does support most platforms (including Windows, Linux and most flavors
of Unix) and multiple protocols.

http://curl.haxx.se/libcurl/

-casey

http://pidgin.im/pipermail/devel/2007-November/003971.html
Vishal Rao vishalrao at gmail.com
Tue Nov 6 08:29:02 EST 2007


thanks, i've started to use the libcurl which comes with cygwin and my
libpurple plugin compiles under windows/cygwin/mingw.

problem is, when i include curl and call its init and cleanup
functions in the plugin code, the plugin no longer shows up in
pidgin's plugin list to load! the plugin works again when i comment
out the curl code... im statically linking curl and my plugin dll size
goes up from about 100k to 500k.

any ideas as to why this is happening and how to get it to work?

--
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."

http://pidgin.im/pipermail/devel/2007-November/003972.html
Daniel Atallah daniel.atallah at gmail.com
Tue Nov 6 09:10:12 EST 2007


The problem is likely that you're using the cygwin-dependent libcurl.
The reason that your plugin no longer appears is that it probably
can't find cygwin1.dll, which libcurl needs. Using the MS dependency
checker application on your plugin dll will verify this. Pidgin (on
Windows) is a native win32 application, so you should use a natively
compiled libcurl instead and avoid having these problems.

-D

http://pidgin.im/pipermail/devel/2007-November/003977.html
Vishal Rao vishalrao at gmail.com
Tue Nov 6 11:19:38 EST 2007


Yup, it did seem to have a dependency on cygwin. So I built libcurl
myself and rebuilt the plugin. Still see the same problem. Dependency
walker shows dependency on libpurple.dll and dwmapi.dll which is the
same as the working plugin without curl.

If I comment out the calls to curl's init and cleanup, the plugin
loads. I moved the calls to other functions and not the plugin's
init/load, still the plugin does not load if I include curl calls...

--
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."

http://pidgin.im/pipermail/devel/2007-November/003980.html
Vishal Rao vishalrao at gmail.com
Tue Nov 6 11:36:42 EST 2007


Doh, nevermind. I just needed to place libcurl.dll in Pidgin's folder
not in the plugins subfolder. Static linking is giving me linker
errors so I'm using the curl dll.... thanks!

--
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."

http://pidgin.im/pipermail/devel/2007-November/003988.html
Vishal Rao vishalrao at gmail.com
Wed Nov 7 00:46:56 EST 2007

FYI I've attached my libpurple plugin code for any comments on it.
It's supposed to be a "webaware" plugin similar to miranda-im's
webaware plugin which uploads your status so you can display it on
your webpage.

I'm writing it mostly for myself because I didn't find an existing
replacement plugin for Pidgin which I'm starting to use on Linux and
Windows... I hope there doesn't already exist a similar plugin for
Pidgin which I could just use?

--
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webaware.c
Type: text/x-csrc
Size: 11254 bytes
Desc: not available
Url : http://pidgin.im/pipermail/devel/attachments/20071107/eeedb93a/attachment-0001.c

attachment-0001.c:
/*
 * WebAware (version 0.0.3) libpurple plugin.
 *
 * Copyright (C) 2007 Vishal Rao <vishal.rao@lahsiv.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 * http://www.gnu.org/copyleft/gpl.html
 */

/** 
 * This is a libpurple plugin which places your IM status on FTP or local directories.
 * It is useful for displaying your status on your website.
 */

/*
Changelog:

0.0.3 (Nov 6th, 2007) :
Now using libcurl and glib threads/mutexes for the (hardcoded for me) FTP upload.

0.0.2 (Oct 9th, 2007) :
Now just listens to account-status-changed signals.

0.0.1 (Oct 9th, 2007) :
First cut based on helloworld.c hardcoded only for MSN, Yahoo and GoogleTalk.
Can only listen to signed-on and signed-off signals.
Does not store status anywhere in this version.
*/

/*
TODO :

1. Actually place status on multiple FTP and local dirs.
2. Handle all available protocols not just MSN, Yahoo and GoogleTalk.
3. Use Pref API to load/store config along with UI.
*/

#define PURPLE_PLUGINS

#include <glib.h>

#ifndef G_GNUC_NULL_TERMINATED
  #if __GNUC__ >= 4
    #define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
  #else
    #define G_GNUC_NULL_TERMINATED
  #endif /* __GNUC__ >= 4 */
#endif /* G_GNUC_NULL_TERMINATED */

#include "plugin.h"
#include "version.h"
#include "request.h"
#include "notify.h"
#include "connection.h"
#include "signals.h"
#include "util.h"

#include <curl/curl.h>

CURL * g_curl = NULL;

char g_curldata[500] = {0};
int g_curldatalen = 0;

GMutex * g_statusmutex = NULL;
GMutex * g_threadmutex = NULL;

int g_threadstarted = 0;
GThread * g_thread = NULL;
GError * g_error = NULL;

PurplePlugin * g_plugin = NULL;

/*
 * Connection protocol_id list:
 * MSN is "prpl-msn"
 * Yahoo is "prpl-yahoo"
 * GTalk is "prpl-jabber"
 */

PurpleConnection * g_msn = NULL;
PurpleConnection * g_yahoo = NULL;
PurpleConnection * g_gtalk = NULL;

gulong g_statusid = 0;

char g_msnstatus[100] = {0};
char g_yahoostatus[100] = {0};
char g_gtalkstatus[100] = {0};

static void
check_connection(PurpleConnection * conn)
{
  const char * msn = NULL;
  const char * yahoo = NULL;
  const char * gtalk = NULL;

  if (!g_msn)
  {
    msn = purple_strcasestr(conn->account->protocol_id, "prpl-msn");

    if (msn)
    {
      g_msn = conn;
      return;
    }
  }

  if (!g_yahoo)
  {
    yahoo = purple_strcasestr(conn->account->protocol_id, "prpl-yahoo");

    if (yahoo)
    {
      g_yahoo = conn;
      return;
    }
  }

  if (!g_gtalk)
  {
    gtalk = purple_strcasestr(conn->account->protocol_id, "prpl-jabber");

    if (gtalk)
    {
      g_gtalk = conn;
      return;
    }
  }
}

static void
update_status(PurpleConnection * conn, char * gstatus)
{
  GList * statuses = NULL;
  GList * statusitem = NULL;
  PurpleStatus * status = NULL;
  PurpleStatusType * statustype = NULL;
  PurpleStatusPrimitive statusprimitive = PURPLE_STATUS_UNSET;

  g_strlcpy(gstatus, "Unknown", 99);
  
  statuses = purple_presence_get_statuses(conn->account->presence);
  
  statusitem = g_list_first(statuses);

  g_mutex_lock(g_statusmutex);
  
  while (statusitem)
  {
    status = (PurpleStatus *) statusitem->data;
    
    if (purple_status_is_active(status))
    {
      statustype = purple_status_get_type(status);
      
      statusprimitive = purple_status_type_get_primitive(statustype);

/*      
      purple_notify_message(g_plugin, PURPLE_NOTIFY_MSG_INFO, conn->account->protocol_id,
        purple_primitive_get_name_from_type(statusprimitive), NULL, NULL, NULL);
        */
      
      g_strlcpy(gstatus, purple_primitive_get_name_from_type(statusprimitive), 99);
    }
    
    statusitem = g_list_next(statusitem);
  }
  
  g_mutex_unlock(g_statusmutex);
}

// curlreader is the "data provider" for the libcurl ftp upload
static size_t
curlreader(void *ptr, size_t size, size_t nmemb, void *stream)
{
  static int total = 0;
  int current = 0;
  
  while (total < g_curldatalen && current < size*nmemb)
  {
    *(((char*)ptr)+current) = *(((char*)stream)+total);
    
    total++;
    current++;
  }
  
  if (current == 0) total = 0;
  
  return current;
}

// uploader is the thread which waits 10s before performing the upload
static gpointer
uploader(gpointer data)
{
  CURLcode result;
  //GTimer * timer = NULL;
  
  //sleep(10000); // wait 10 seconds before uploading status...
  
  /*
  timer = g_timer_new();
  g_timer_start(timer);
  while(g_timer_elapsed(timer, NULL) < 10.0);
  g_timer_destroy(timer);
  */
  
  g_usleep(10000000); // wait 10 seconds before uploading status...
  
  // currently uploading miranda-im's webaware_data.js file format!
  
  g_mutex_lock(g_statusmutex);
  strcpy(g_curldata, "initArray(4);\n");
  strcat(g_curldata, "addData(new Array(\"CSTIME\", 2007, 11, 06, 15, 00, 00));\n");
  strcat(g_curldata, "addData(new Array(\"STATUS\", \"JABBER\", 40071, \"");
  strcat(g_curldata, g_gtalkstatus);
  strcat(g_curldata, "\", \"Nope, not here.\"));\n");
  strcat(g_curldata, "addData(new Array(\"STATUS\", \"MSN\", 40071, \"");
  strcat(g_curldata, g_msnstatus);
  strcat(g_curldata, "\", \"Nope, not here.\"));\n");
  strcat(g_curldata, "addData(new Array(\"STATUS\", \"YAHOO\", 40071, \"");
  strcat(g_curldata, g_yahoostatus);
  strcat(g_curldata, "\", \"Nope, not here.\"));\n");  
  g_mutex_unlock(g_statusmutex);
  g_curldatalen = strlen(g_curldata);
  
  g_curl = curl_easy_init();
  // upload to ftp
  if (g_curl)
  {
    curl_easy_setopt(g_curl, CURLOPT_UPLOAD, 1);
    curl_easy_setopt(g_curl, CURLOPT_URL, "ftp://user:pass@site.tld/folder/file");
    curl_easy_setopt(g_curl, CURLOPT_READDATA, g_curldata);
    curl_easy_setopt(g_curl, CURLOPT_READFUNCTION, &curlreader);
    result = curl_easy_perform(g_curl);
    curl_easy_cleanup(g_curl);
  }  
  
  g_mutex_lock(g_threadmutex);
  g_threadstarted = 0;
  g_mutex_unlock(g_threadmutex);
  
  return NULL;
}

static void
save_status(const char * gstatus)
{
  g_mutex_lock(g_threadmutex);
  
  if (g_threadstarted == 0)
  {
    g_thread = g_thread_create(&uploader, NULL, FALSE, &g_error);
    g_threadstarted = 1;
  }
  
  g_mutex_unlock(g_threadmutex);
}

static void
save_status2(const char * gstatus)
{
  CURLcode result;
  
  // TODO : Read prefs and save status to FTP and/or local dir.
  /*
  purple_notify_message(g_plugin, PURPLE_NOTIFY_MSG_INFO, "Save Status",
    gstatus, NULL, NULL, NULL);  
  */
  g_curl = curl_easy_init();
  // upload to ftp
  if (g_curl)
  {
    curl_easy_setopt(g_curl, CURLOPT_UPLOAD, 1);
    curl_easy_setopt(g_curl,CURLOPT_URL, "ftp://user:pass@site.tld/folder/file");
    curl_easy_setopt(g_curl, CURLOPT_READDATA, g_curldata);
    curl_easy_setopt(g_curl, CURLOPT_READFUNCTION, &curlreader);
    result = curl_easy_perform(g_curl);
    curl_easy_cleanup(g_curl);
  }
}

static void
update_and_save_status(PurpleConnection * conn)
{
  const char * msn = NULL;
  const char * yahoo = NULL;
  const char * gtalk = NULL;

  msn = purple_strcasestr(conn->account->protocol_id, "prpl-msn");
  yahoo = purple_strcasestr(conn->account->protocol_id, "prpl-yahoo");
  gtalk = purple_strcasestr(conn->account->protocol_id, "prpl-jabber");

  if (msn)
  {
    update_status(g_msn, g_msnstatus);
    save_status(g_msnstatus);
  }
  else if (yahoo)
  {
    update_status(g_yahoo, g_yahoostatus);
    save_status(g_yahoostatus);
  }
  else if (gtalk)
  {
    update_status(g_gtalk, g_gtalkstatus);
    save_status(g_gtalkstatus);
  }
}

static void
account_status_changed(PurpleAccount *account, PurpleStatus *old, PurpleStatus *new, gpointer data)
{
  PurpleConnection * conn = NULL;
  /*
  purple_debug_misc("signals test", "account-status-changed (%s, %s, %s)\n",
          purple_account_get_username(account),
          purple_status_get_name(old),
          purple_status_get_name(new));
  */
  
  /*
  char msg[100] = {0};
  
  g_snprintf(msg, 99, "account: %s, old: %s, new: %s", purple_account_get_protocol_name(account),
    purple_status_get_name(old), purple_status_get_name(new));
  
  purple_notify_message(g_plugin, PURPLE_NOTIFY_MSG_INFO, "Account Status Changed",
    msg, NULL, NULL, NULL);  
  */
  
  conn = purple_account_get_connection(account);
  check_connection(conn);
  update_and_save_status(conn);  
}

static gboolean
plugin_load(PurplePlugin * plugin)
{
  /*
  purple_notify_message(plugin, PURPLE_NOTIFY_MSG_INFO, "WebAware Load",
    "plugin_load() called", NULL, NULL, NULL);
  */

  /*
  g_signonid = purple_signal_connect(purple_connections_get_handle(), "signed-on", g_plugin,
    PURPLE_CALLBACK(signed_on_cb), NULL);

  g_signoffid = purple_signal_connect(purple_connections_get_handle(), "signed-off", g_plugin,
    PURPLE_CALLBACK(signed_off_cb), NULL);
  */

  /*
  g_statusid = purple_signal_connect(purple_connections_get_handle(), "savedstatus-changed", g_plugin,
    PURPLE_CALLBACK(savedstatus_changed_cb), NULL);
  */

  g_statusid = purple_signal_connect(purple_accounts_get_handle(), "account-status-changed", g_plugin,
    PURPLE_CALLBACK(account_status_changed), NULL);

  g_statusmutex = g_mutex_new();
  g_threadmutex = g_mutex_new();
  
  return TRUE;
}

static gboolean
plugin_unload(PurplePlugin * plugin)
{
  /*
  purple_notify_message(plugin, PURPLE_NOTIFY_MSG_INFO, "WebAware UnLoad",
    "plugin_unload() called", NULL, NULL, NULL);
  */

  purple_signals_disconnect_by_handle(g_plugin);

  g_mutex_free(g_statusmutex);
  g_mutex_free(g_threadmutex);
  
  return TRUE;
}

static void
plugin_destroy(PurplePlugin * plugin)
{
  /*
  purple_notify_message(plugin, PURPLE_NOTIFY_MSG_INFO, "WebAware Destroy",
    "plugin_destroy() called", NULL, NULL, NULL);
  */

  purple_signals_uninit();
  purple_connections_uninit();
}

static PurplePluginInfo
info =
{
    PURPLE_PLUGIN_MAGIC,
    PURPLE_MAJOR_VERSION,
    PURPLE_MINOR_VERSION,
    PURPLE_PLUGIN_STANDARD,
    NULL,
    0,
    NULL,
    PURPLE_PRIORITY_DEFAULT,

    "core-vishalrao-webaware",
    "WebAware",
    "0.0.3",

    "Web Awareness Plugin",
    "The WebAware plugin places your status information on FTP or local directories."
    " It is useful for being able to display your status on your webpage.",
    "Vishal Rao <vishal.rao@lahsiv.net>",
    "http://lahsiv.net/",

    plugin_load,
    plugin_unload,
    plugin_destroy,

    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL 
};

static void
init_plugin(PurplePlugin * plugin)
{
  g_plugin = plugin;
  purple_signals_init();
  purple_connections_init();
  
  //Note: purple_accounts_init() seems to cause Pidgin to not sign on!
  //purple_accounts_init();
}

PURPLE_INIT_PLUGIN(webaware, init_plugin, info);

// --------- The End ---------

Tumblr upload a static file edit

http://www.tumblr.com/themes/upload_static_file

Javascript decompressor edit

http://www.norazoclub.com/site/comm_study/bbs_view.asp?b_no=101218&b_code=1034

http://jsbeautifier.org/

Tumblr auto scroll edit

<script type="text/javascript" src"http://static.tumblr.com/q0etgkr/mFbkoqlkr/tumblrautopager.js"></script>

Decompressed source:
var tumblrAutoPager = {
    url: "http://proto.jp/",
    ver: "0.1.7",
    rF: true,
    gP: {},
    pp: null,
    ppId: "",
    LN: location.hostname,
    init: function ()
    {
        if ($("autopagerize_icon") || navigator.userAgent.indexOf('iPhone') != -1) return;
        var tAP = tumblrAutoPager;
        var p = 1;
        var lh = location.href;
        var lhp = lh.lastIndexOf("/page/");
        var lht = lh.lastIndexOf("/tagged/");
        if (lhp != -1)
        {
            p = parseInt(lh.slice(lhp + 6));
            tAP.LN = lh.slice(7, lhp);
        }
        else if (lht != -1)
        {
            tAP.LN = lh.slice(7);
            if (tAP.LN.slice(tAP.LN.length - 1) == "/") tAP.LN = tAP.LN.slice(0, tAP.LN.length - 1);
        }
        else if ("http://" + tAP.LN + "/" != lh)
        {
            return;
        };
        var gPFncs = [];
        gPFncs[0] = function (aE)
        {
            var r = [];
            for (var i = 0, l = aE.length; i < l; i++)
            {
                if (aE[i].className == "autopagerize_page_element")
                {
                    r = gCE(aE[i]);
                    break;
                }
            }
            return r;
        };
        gPFncs[1] = function (aE)
        {
            var r = [];
            for (var i = 0, l = aE.length; i < l; i++)
            {
                var arr = aE[i].className ? aE[i].className.split(" ") : null;
                if (arr)
                {
                    for (var j = 0; j < arr.length; j++)
                    {
                        arr[j] == "post" ? r.push(aE[i]) : null;
                    }
                }
            }
            return r;
        };
        gPFncs[2] = function (aE)
        {
            var r = [];
            var tmpId = tAP.ppId ? [tAP.ppId] : ["posts", "main", "container", "content", "apDiv2", "wrapper", "projects"];
            for (var i = 0, l = aE.length; i < l; i++)
            {
                for (var j = 0; j < tmpId.length; j++)
                {
                    if (aE[i].id == tmpId[j])
                    {
                        r = gCE(aE[i]);
                        tAP.ppId = aE[i].id;
                        break;
                    }
                }
            }
            return r;
        };
        for (var i = 0; i < gPFncs.length; i++)
        {
            var getElems = gPFncs[i](document.body.getElementsByTagName('*'));
            if (getElems.length)
            {
                tAP.gP = gPFncs[i];
                tAP.pp = getElems[0].parentNode;
                break;
            }
        }
        function gCE(pElem)
        {
            var r = [];
            for (var i = 0, l = pElem.childNodes.length; i < l; i++)
            {
                r.push(pElem.childNodes.item(i))
            }
            return r;
        }
        if (!tAP.pp)
        {
            return;
        }
        sendRequest.README = {
            license: 'Public Domain',
            url: 'http://jsgt.org/lib/ajax/ref.htm',
            version: 0.516,
            author: 'Toshiro Takahashi'
        };

        function chkAjaBrowser()
        {
            var A, B = navigator.userAgent;
            this.bw = {
                safari: ((A = B.split('AppleWebKit/')[1]) ? A.split('(')[0].split('.')[0] : 0) >= 124,
                konqueror: ((A = B.split('Konqueror/')[1]) ? A.split(';')[0] : 0) >= 3.3,
                mozes: ((A = B.split('Gecko/')[1]) ? A.split(' ')[0] : 0) >= 20011128,
                opera: ( !! window.opera) && ((typeof XMLHttpRequest) == 'function'),
                msie: ( !! window.ActiveXObject) ? ( !! createHttpRequest()) : false
            };
            return (this.bw.safari || this.bw.konqueror || this.bw.mozes || this.bw.opera || this.bw.msie)
        }
        function createHttpRequest()
        {
            if (window.XMLHttpRequest)
            {
                return new XMLHttpRequest()
            }
            else
            {
                if (window.ActiveXObject)
                {
                    try
                    {
                        return new ActiveXObject('Msxml2.XMLHTTP')
                    }
                    catch (B)
                    {
                        try
                        {
                            return new ActiveXObject('Microsoft.XMLHTTP')
                        }
                        catch (A)
                        {
                            return null
                        }
                    }
                }
                else
                {
                    return null
                }
            }
        };

        function sendRequest(E, R, C, D, F, G, S, A)
        {
            var Q = C.toUpperCase() == 'GET',
                H = createHttpRequest();
            if (H == null)
            {
                return null
            }
            if ((G) ? G : false)
            {
                D += ((D.indexOf('?') == -1) ? '?' : '&') + 't=' + (new Date()).getTime()
            }
            var P = new chkAjaBrowser(),
                L = P.bw.opera,
                I = P.bw.safari,
                N = P.bw.konqueror,
                M = P.bw.mozes;
            if (typeof E == 'object')
            {
                var J = E.onload;
                var O = E.onbeforsetheader
            }
            else
            {
                var J = E;
                var O = null
            }
            if (L || I || M)
            {
                H.onload = function ()
                {
                    J(H);
                    H.abort()
                }
            }
            else
            {
                H.onreadystatechange = function ()
                {
                    if (H.readyState == 4)
                    {
                        J(H);
                        H.abort()
                    }
                }
            }
            R = K(R, D);
            if (Q)
            {
                D += ((D.indexOf('?') == -1) ? '?' : (R == '') ? '' : '&') + R
            }
            H.open(C, D, F, S, A);
            if ( !! O)
            {
                O(H)
            }
            B(H);
            H.send(R);

            function B(T)
            {
                if (!L || typeof T.setRequestHeader == 'function')
                {
                    T.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
                }
                return T
            }
            function K(X, V)
            {
                var Z = [];
                if (typeof X == 'object')
                {
                    for (var W in X)
                    {
                        Y(W, X[W])
                    }
                }
                else
                {
                    if (typeof X == 'string')
                    {
                        if (X == '')
                        {
                            return ''
                        }
                        if (X.charAt(0) == '&')
                        {
                            X = X.substring(1, X.length)
                        }
                        var T = X.split('&');
                        for (var W = 0; W < T.length; W++)
                        {
                            var U = T[W].split('=');
                            Y(U[0], U[1])
                        }
                    }
                }
                function Y(b, a)
                {
                    Z.push(encodeURIComponent(b) + '=' + encodeURIComponent(a))
                }
                return Z.join('&')
            }
            return H
        }
        function addNextPage(oj)
        {
            if (oj.status == 404)
            {
                tAP.remainFlg = false;
                return;
            }
            var d = document.createElement("div");
            d.innerHTML = oj.responseText;
            var posts = tAP.gP(d.getElementsByTagName("*"));
            if (posts.length < 2)
            {
                tAP.rF = false;
                return;
            }
            var hr = document.createElement("hr");
            hr.className = "tumblrAutoPager_page_separator";
            tAP.pp.appendChild(hr);
            d = document.createElement("div");
            d.className = "tumblrAutoPager_page_info";
            d.innerHTML = "<p style='float:left'><a href=http://" + tAP.LN + "/page/" + p + ">Page " + p + "</a></p>
" + "<br style='clear:both' />";
            tAP.pp.appendChild(d);
            for (var i = 0; i < posts.length; i++)
            {
                tAP.pp.appendChild(posts[i]);
            }
            var footer = $("footer");
            footer ? footer.parentNode.appendChild(footer) : null;
            tAP.rF = true;
        }
        watch_scroll();

        function watch_scroll()
        {
            var d = document.compatMode == "BackCompat" ? document.body : document.documentElement;
            var r = d.scrollHeight - d.clientHeight - (d.scrollTop || document.body.scrollTop);
            if (r < d.clientHeight * 2 && tAP.rF)
            {
                tAP.rF = false;
                p++;
                sendRequest(addNextPage, "", "GET", "http://" + tAP.LN + "/page/" + p, true);
            }
            setTimeout(arguments.callee, 200);
        };

        function $(id)
        {
            return document.getElementById(id)
        };
    },
    switchAutoPage: function ()
    {
        this.rF = !this.rF;
        var aE = document.getElementsByTagName('*');
        for (var i = 0, l = aE.length; i < l; i++)
        {
            if (aE[i].className == "tAP_switch")
            {
                aE[i].firstChild.nodeValue = this.rF ? "AutoPage[OFF]" : "AutoPage[ON]";
            }
        }
    }
};
window.addEventListener ? window.addEventListener('load', tumblrAutoPager.init, false) : window.attachEvent ? window.attachEvent("onload", tumblrAutoPager.init) : window.onload = tumblrAutoPager.init;

finch(pidgin) compile cf.sh edit

pidgin compile options to use finch only. (disable GUI and audio related features)

cf.sh:
#!/bin/bash

PREFIX="/home/me/usr"

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PREFIX/libxml/lib/pkgconfig"

PATH="$PATH:$PREFIX/intltool/bin" \

./configure \
--disable-gtkui \
--disable-screensaver \
--disable-sm \
--disable-gtkspell \
--disable-gestures \
--disable-gstreamer \
--disable-gstreamer-interfaces \
--disable-farsight \
--disable-vv \
--disable-idn \
--disable-meanwhile \
--disable-avahi \
--disable-tcl \
--disable-tk \
--disable-pixmaps-install \
--disable-doxygen \
--disable-dot \
--disable-devhelp \
--with-ncurses-headers=$PREFIX/ncurses/include \
--disable-nm \
--disable-perl \

$ make DESTDIR="$PWD/build" install

finch install edit

데비안 lenny 머신에서 apt-get install finch로 설치하고보니 버전이 낮아서 MSN을 지원안한다.
컴파일해보려고 pidgin 소스를 받아 삽질 해봤는데 한글이 자꾸 깨짐.
알고보니 libncursesw를 설치하지 않아서였음 (/2011/05/libncursesw.html)

귀찮아서 그냥 백포트로 설치했더니 MSN이 지원됨 (/2011/05/aptitude.html)

$ sudo aptitude -t lenny-backports install finch

Linux에서 특정 텍스트내의 문자열 찾기 edit

http://fotobank-textcube.blogspot.com/2010/04/100429-linux에서-특정-텍스트내의-문자열-찾기.html

100429 Linux에서 특정 텍스트내의 문자열 찾기
"가나다" 으로 시작하는건 모두 가져와라~~~(해당 폴더 및 하위폴더)

grep -ir 가나다 * ( 가나다와 * 사이에 한칸 띄워야 함)

"가 나다" 으로 시작하는건 모두 가져와라~~~(해당 폴더 및 하위폴더)

grep -ir 가.나다 * 텍스트사이가 떨어져 있을 경우에는 .으로 표시

Shared library - static link specific dependency edit

http://www.mail-archive.com/libtool@gnu.org/msg10643.html

Hello Alon, and sorry for the delay,

* Alon Bar-Lev wrote on Fri, Jun 06, 2008 at 09:15:37AM CEST:
> > > I want to make a shared library without dependencies. I compile the
> > > dependencies in PIC mode, so it should be compatible.

> Let's say I have liba.la pointing to liba.so* and liba.a(pic)
> installed in my system. I am not building this right now.
> Now, I would like to create moduleb.so that use liba but I do not want
> to have external dependency of liba.so*.

Ah, ok. Libtool doesn't really support this. Well, only with
convenience archives, but not with installed stuff. Here's why:

The general idea is that you should not have multiple entities
of the same code in different libraries
, as this can lead to
subtle and difficult-to-analyze bugs. Either your libraries are
shared (and its dependencies are, too), or your libraries are
static, and their code will end up in the final program (but not
in other libraries depending on it). This is how libtool handles
shared libraries and shared modules, and also how it handles
static libraries and dlpreopened modules. Of course the latter
only work with libltdl.

This is also the reason why installing convenience archives is
discouraged: it makes it easy to end up with code being duplicated
into several libraries.

(I suppose you could hack around this by manually copying
libconvenience.la and $(LT_OBJDIR)/libconvenience.a into some installed
location, and use that later; but again, be warned). Maybe libtool
should support this (I think it did at one point in the past), but add a
big fat warning sign. Hmm.

Cheers,
Ralf

What Alon Bar-Lev(questioner) wants



Packet Sniffer Wireshark edit

http://www.wireshark.org/

using wireshark under windows needs winpcap: http://www.winpcap.org/install/default.htm

http://sectools.org/sniffers.html

Wireshark : Sniffing the glue that holds the Internet together
Wireshark (known as Ethereal until a trademark dispute in Summer 2006) is a fantastic open source network protocol analyzer for Unix and Windows. It allows you to examine data from a live network or from a capture file on disk. You can interactively browse the capture data, delving down into just the level of packet detail you need. Wireshark has several powerful features, including a rich display filter language and the ability to view the reconstructed stream of a TCP session. It also supports hundreds of protocols and media types. A tcpdump-like console version named tethereal is included. One word of caution is that Ethereal has suffered from dozens of remotely exploitable security holes, so stay up-to-date and be wary of running it on untrusted or hostile networks (such as security conferences).

OH fuck yeah Wireshark!

vmware 공인 IP 설정 edit

vmware player 3.0 이상의 버전을 사용중이라면 여기에서 네트워크 설정을 해주는 vmnetcfg.exe를 설치해야 하고 VM머신을 위한 공인 아이피가 있어야함.

http://blog.nextcube.pe.kr/tag/%EA%B3%B5%EC%9D%B8ip

vmnetcfg.exe 설정


Bridged의 랜카드를 잡아준다.



VM머신의 네트워크 어뎁터 설정


아래와 같이 설정한다.



DHCP가 설정되어 있지 않다면 VM머신의 OS에서 네트워크 설정을 해주면 된다.

VMware Player 3.0 이상 버전에서 NAT 등의 네트워크 설정 vmnetcfg.exe 설치 edit

VMware Player 3.0 이후 부터 NAT 등의 네트워크 설정을 해 주는 vmnetcfg.exe가 설치가 되지 않는다고 한다. 그렇지만 설치 파일 안에는 들어있다고 하네요. 먼저 VMware-player-3.0.0-XXX.exe에 /e 옵션을 주어서 실행합니다. 압축 해제만 하는 옵션입니다.
VMware-player-3.0.0-203739.exe /e INSTALL_DIR
여러 개의 파일이 설치가 되는데 그 중에 network.cab 파일 안에 vmnetcfg.exe가 숨어 있습니다. 그 파일만 꺼내면 됩니다.

vmware 우분투 한영키 문제 edit

어찌저찌 찾아보니 vmware에서 우분투를 깔면 한영키와 한자키가 인식되지 않는 문제가 더러 있다고 한다.

http://barosl.com/blog/entry/using-han-eng-key-without-kernel-patch

뿌리 권한으로 다음을 실행합니다:

# setkeycodes 71 122
# setkeycodes 72 123

그다음 xev 를 실행시켜 보면, 커널 패치를 하지 않은 상태에서도 한영키가 122, 한자키가 121 로 인식됩니다!

시스템 시작시에 항상 이 명령이 실행되도록 해 놓는 것이 좋겠죠?

그럼 이제 늘 하던대로 xmodmap 만 먹이면 됩니다. ;)

$ xmodmap -e 'keycode 122 = Hangul'
$ xmodmap -e 'keycode 121 = Hangul_Hanja'

흐흐... 굉장한 팁이군요... 커널 패치의 번거로움이 하나 줄겠네요... ^^

내가 적용한 방법


스크립트 생성


/etc/init.d/hangul_setkeycodes.sh

#!/bin/bash
setkeycodes 71 123
setkeycodes 72 122

시작시 자동으로 실행되게끔 설정


# update-rc.d hangul_setkeycodes.sh defaults

다른위치에 설치된 'pkg-config'의 '.pc'파일 'PKG_CONFIG_PATH'환경변수로 컴파일시 인식시키기 edit

http://kldp.org/node/52070

참고로 위 환경 변수 내용을 바꾸기 전에 pkg-config를 실행해서, pkg-config가 제대로 설정 파일을 인식했는지 확인할 수도 있습니다:

$ pkg-config --list-all

문제


libxml을 다른위치에 설치했더니 pidgin 컴파일시 아무리 CFLAG, LDFLAG, LIBS, LIBXML_CFLAGS, LIBXML_LIBS 환경변수들을 설정해줘도 인식하질 못했다.

libxml/lib/ 하위에 pkgconfig 디렉토리가 있는것을 발견하고, 인식시키려고 configure 실행시 환경변수 'PKG_CONFIG_PATH'에 경로를 환경변수 'PATH'처럼 ':'로 구별하여 평소에 하던대로 실행시만 적용되게끔 아래와 같이 실행해도 인식되지 않았다.

$ PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/home/me/usr/libxml/lib/pkgconfig" ./configure

해결방법


아래와같이 환경변수를 export 시킨 후 configure 해보니 인식성공.

$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/home/me/usr/libxml/lib/pkgconfig"

/2011/08/finchpidgin-compile-cfsh.html

원인예상


configure 도중 내부적으로 pkg-config 를 호출하는데 처음의 방법은 환경변수를 ./configure 에만 전달하고 pkg-config 에는 전달하지 못해서 생기는 문제일까?

pidgin nateon 플러그인 접속 불가 현상 원인 edit

왜 갑자기 pidgin에서 네이트온 접속이 안되나 소켓을 캡쳐해 봤더니...

네이트온 3.5-3.7버전 일부(3.7.3.0) 종료안내

좀더 다양한 서비스와 편리한 기능을 제공하기 위해 네이트온 3.5-3.7버전 일부(3.7.3.0) 종료하게 되었습니다.

*종료일시 : 2011년 8월 1일(월)

그동안 네이트온 3.5-3.7버전 일부(3.7.3.0)를 이용해주셔서 감사합니다.
네이트온 최신 버전을 통해 계속해서 서비스를 이용하실 수 있습니다.
( http://nateonweb-stage.nate.com/download/messenger/windows/4.1/download.php )
감사합니다.

하지만 네이트온 리눅스버전 클라이언트는 잘 동작함.

vi 붙여넣기 시 들여쓰기 자동 들여쓰기 해제 edit

http://devday.tistory.com/entry/vi-붙여넣기-시-들여쓰기-문제

vi에서 붙여넣기를 하면 들여쓰기 때문에 본래 모양대로 들어가지 않는다.

이 때 다음과 같이 하면 문제를 해결할 수 있다.

:set paste

입력모드에서 붙여넣기를 한다.

붙여넣기 작업을 완료하면 다음과 같이 원래대로 복원할 수 있다.

:set nopaste

http://kldp.org/node/28154

Minecraft server configurations edit

server.properties


http://www.minecraftwiki.net/wiki/Server.properties

server.properties
#Minecraft server properties
#Tue Jun 07 18:05:30 KST 2011
level-name=world
view-distance=10
spawn-monsters=true
online-mode=false
spawn-animals=true
max-players=10
server-ip=
pvp=false
level-seed=randomseed
server-port=25565
allow-flight=false
white-list=false
allow-nether=false
public=false
max-connections=1

  • online-mode - 접속하는 유저들이 마인크레프트의 정식 유저인지 체크 (true, false)
  • max-players - 최대 동시 접속자 수 제한
  • public - 서버 리스트에 표시 여부 (true, false)
  • max-connections - 한 IP당 허용할 접속들 (1~3 (3 이상의 값을 설정해도 3))

Bukkit mod


플레이에 필수적인 플러그인들은 Bukkit 모드가 필요하다.

다운로드 및 설치법: http://wiki.bukkit.org/Setting_up_a_server

마인크래프트 공식 사이트에서 받는 'minecraft_server.jar' 파일을 실행하는 대신에 bukkit mod 의 jar 파일을 실행하는 방식.

필수 플러그인들


  • lwc - 체스트 잠금 플러그인
  • register / login 플러그인
  • home / sethome 플러그인 (+다른 유저의 집으로 이동하는 기능도 유용함)

리눅스 프로세스 우선순위 변경하기 edit

  • 프로그램을 우선순위를 설정하여 실행할때는 nice를 쓴다.
  • 이미 실행중인 프로세스는 renice로 수정할 수 있다.
  • NICE값이 작은값일수록 우선순위가 높으며 NICE값이 큰값일수록 우선순위가 낮다.
  • NICE값을 0미만으로 수정하려면(우선순위를 높이려면) 루트권한이 필요하다.

이미 실행된 프로세스의 우선순위 수정


우선순위 낮추기


$ renice +10 PID

우선순위 높이기


루트 권한이 필요함.

# renice -1 PID

데비안 기준으로 시스템 백그라운드 서비스들은 NICE값이 -5임.
서버 로드가 높을때 특정 데몬의 우선순위를 높이고싶다면 -1만 해줘도 충분함.


참고 링크


http://www.ibm.com/developerworks/kr/library/l-lpic1-v3-103-6/index.html

blogger archive 위젯 hierarchy 스타일 사용시 이전달 포스트들 모두 펼치기 edit

세로로 나뉜 템플릿을 사용하면서 왼쪽에 Archive 위젯을 사용하여 모든 포스트들을 길게 출력해놓으려고 했었으나 달이 바뀌니 전달에 포스팅한 포스트들이 모두 접혀버려서 썰렁해졌다.
그래서 죄다 펼쳐버림.

includable id 'interval' in widget type 'BlogArchive':

...
<b:includable id='interval' var='intervalData'>
  <b:loop values='data:intervalData' var='i'>
      <ul class='hierarchy'>
<!--
        <li expr:class='&quot;archivedate &quot; + data:i.expclass'>
-->
        <li expr:class='&quot;archivedate expanded&quot;'>
          <b:include data='i' name='toggle'/>
          <a class='post-count-link' expr:href='data:i.url'><data:i.name/></a>
            <span class='post-count' dir='ltr'>(<data:i.post-count/>)</span>
          <b:if cond='data:i.data'>
            <b:include data='i.data' name='interval'/>
          </b:if>
          <b:if cond='data:i.posts'>
            <b:include data='i.posts' name='posts'/>
          </b:if>
        </li>
      </ul>
  </b:loop>
</b:includable>
...

widget type 'BlogArchive' 는 스타일별로 include 하는데 'hierarchy' 스타일은 'interval' 을 include 한다. 이 'interval' includable(...) 함수는 내부에서 재귀호출로 데이터들을 찍어내는데 'toggle' includable 함수로 삼각형(▶, ▼)을 찍어낸다. (data -> intervalData[i].expclass 가 'expanded' 면 '▼', collapsed (아니면) '▶') 쓰고보니 외계어

삼각형(▶)은 여전히 오른쪽을 향하고 있는데(안열렸을때처럼) 원하는 달을 누르면 그 달에 포스팅된 포스트들만 보여주고 삼각형이 밑을 향하게 되므로 그냥 두었음. (includable id 'toggle' 을 수정하면 모두 밑으로 향하게 할 수 있다.)

아래에 링크걸어둔 '한글' 블로거 레이아웃 메뉴얼들을 한번쯤 정독하면 템플릿 위젯 소스를 보고 이해할 수 있다.

참고 메뉴얼



어쨋든 이 뭔가 구글답다. 역시 구글느님...

요즘도 압축하는 것이 편리하고 유용한 것일까요? edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 15일 (화) 11:57)

http://qaos.com/viewtopic.php?topic=6814&forum=1

아직도 압축해서 전송하는 것이 훨씬 효과적입니다.

전송 오류를 피할 수 있습니다.


가장 쉬운 예로 .AVI 파일을 들겠습니다. 보통 700M짜리 파일이 많으며, MPEG4로 이미 압축되어 있는 경우가많기때문에 압축을 해도 크기는 줄지 않습니다. 그러나 압축을하는 경우 잇점이 있습니다. CRC 기능때문에 전송중 오류가 발생한 경우 오류를 추출할 수 있고, 원하는 경우 복구 기능을 이용해서 복구할 수 있습니다.

그러나 압축을 하지 않고 전송하면 깨진 파일이 그대로 유포될 수 있습니다. 인터넷에 깨진 동영상이 얼마나 많았으면 DIVXPatch 사이트까지 있을까요.

다만 이 경우 압축을 해도 압축 방식은 저장, 복구 기록 넣기를 선택한 후 압축하는 것이 좋습니다(WinRAR의 경우).

많은 수의 파일에 적합합니다.


파일의 수가 많은 경우 전송 중 오류가 날 가능성이 많으며, 폴더 채 업로드해도 하나의 파일을 전송하는 것보다 불편합니다. 아울러 하나의 파일을 전송하고, 다시 전송 준비하는 시간을 고려하면 하나의 파일을 전송하는 시간이 동일한 크기의 여러개의 파일을 전송하는 시간보다 훨씬 빠릅니다.

파일 정보를 유지할 수 있습니다.


파일 정보는 별것 아닌 것 같지만 파일의 생성일, 유닉스의 경우 파일의 권한까지 압축 파일에 포함시킬 수 있습니다. 이와같은 파일 정보는 최신 버전 여부를 확인하거나 파일을 정렬할때 아주 유용합니다.

텍스트 파일의 경우에도 압축하는 것이 좋습니다.


IE에 포함된 기능중 하나가 내용을 중심으로 다운로드하는 기능이 있습니다. 이 말은 확장자가 설서 .REG이고 내용이 텍스트라면 다운이되는 것이 아니라 IE가 직접 출력할 수 있음을 의미합니다. 이 경우 메뉴를 이용해서 저장하는 과정을 추가로 거쳐야 합니다.

이외에도 여러가지가 있지만 일단 생각나는 것만 적어봤습니다.

물론 넷트웍 속도가 빠르기때문에 압축이 필요없을 것 같습니다. 이경우 앞서 언급한 압축 프로그램의 저장 기능을 이용하면 됩니다. 아울러 앞서 언급한 것처럼 설사 다른 방식으로 압축된 동영상이나 음악 파일이라도 압축 후 전송하는 것이 좋습니다.

Windows XP 에서 Putty 를 이용한 ssh 터널링으로 samba 연결하기 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 15일 (화) 05:39)

Windows XP 기준

루프백 어댑터 생성


  1. 제어판 -> 새 하드웨어 추가
  2. '예, 하드웨어를 이미 연결했습니다.' 선택
  3. '새 하드웨어 장치 추가' 선택
  4. '목록에서 직접 선택한 하드웨어 설치' 선택
  5. '네트워크 어댑터' 선택
  6. 제조업체 'Microsoft' -> 네트워크 어댑터 'Microsoft Loopback Adapter' 선택





루프백 어댑터 설정


  • 'Microsoft 네트워크용 파일 및 프린터 공유' 체크 제거
  • TCP/IP 속성
    • IP : '10.0.0.1'
    • Netmask: '255.255.255.0'
    • Gateway : '192.9.2.1'
    • DNS : '168.126.63.1'
    • 고급 -> WINS -> 'LMHOSTS 조회가능' 체크 -> 'TCP/IP에서 NetBIOS 사용안함' 체크







Putty 설정


  1. 접속 -> SSH -> 터널링
  2. 원포트 : '10.0.0.1:139'
  3. 대상 : 'yourserver.com:139'
  4. 추가



사용하기


시작 -> 실행 -> '\\10.0.0.1'

네트워크 드라이브 연결


  1. 시작 실행에서 '\\10.0.0.1' 를 열면 삼바에서 설정한대로 네트워크 디렉토리가 뜸
  2. 오른쪽 버튼 -> '네트워크 드라이브 연결' 선택





네트워크 드라이브를 연결하면 마치 자기 하드드라이브처럼 사용할 수 있다. :D

접지를 하는 이유 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 16일 (수) 21:26)

http://www.coolenjoy.net/bbs/zboard.php?id=votes&no=577

접지란?


접지라 하는 것은 전기를 땅으로 흘려 보내는 겁니다.
왜 땅으로 흘려 보내냐면 지구의 정전용량이 무한대 입니다.
쉽게 말하자면 용량이 무한대인 물탱크와 같습니다.또 저항값도 인간(1000옴정도)이 더 높기 때문에
전기도 물처럼 쉽게 흐를수 있는쪽으로 흐르려 하기 때문에 접지를 하게 되면 사람보단 땅으로 흐르게 되고
수도관이나 건물의 철골에 접지하느게 좋은데 수도관은 도시 전체 지하에 매설되어 있고 또 금속 재질도 되어 있어서 더 그쪽으로 흐르려 하고 더 빨리 지구으로 전기가 흘러 들어가게 됩니다.
그리고 절때 피뢰침과 같이 접지를 해서는 않됩니다. 낙뢰를 맞으면 거기에 연결된 가전제품은 전부 작살이 납니다. 꼭 별도로 접지를 하셔야 합니다.

접지용 콘센트?


접지용 콘센트가 있어도 집안에 접지 시공이 안되어있으면 말짱꽝이죠...벽 콘센트 분해했을대 초록색 전선이 콘센트 한구석에 접지되어있으면 뭐 자연스레 접지가 되는거구요.. 아님 따로 접지를 해야죠.. 저같은 경우엔 집이 오래되서 접지 시공이 되지않은 관계로 가스관 이나 수도꼭지 접지를 주로하는 편이죠................땅속에 쇠막대기박아도 되지만 귀찬아서.. ㅋ

접지 안해도 괜찮던데?


정전기 전압이 수만볼트정도입니다. 왜 감전되 죽지 않냐 하면 정전기에는 전류가 없기 때문입니다..
사람이 감전되 죽는것도 전류가 몸을 통해 흐르기 때문입니다. 정전기에 닿을때 따금 하는것도 전류가 아주 작아서
따금하고 마는 것입니다. 따금 할때 전기가 우리몸을 통해 땅으로 흐르기때문에 그런것입니다.
진호성님 말씀대로 정전기에 의해 사람이 기절하거나 죽을 수도 있습니다.

옥상에 피뢰침이 있어서 접지 않하고 사용합니다.


그럼 그 피뢰침에 접지선을 연결 해보세요..
낙뢰칠때 재수없이 피뢰침에 맞게 되면..
그럼 박정군님 집의 전체 가전제품이 다 작살납니다..차단기가 떨어져도 소용이 없습니다. 낙뢰맞으면
가전제품은 다 작살납니다..
피뢰침 접지와 가정집의 접지는 완전히 차원이 다릅니다..

물넣고쓰는 전기제품은 꼭 접지 해야겠네요


절때 그렇지 않습니다. 그렇게 따지면 커피포트, 냉장고, 믹서기등만 접지를 해야 겠네요..
세탁기경우는 감전에 대한것에 대해 접지가 필요하겠지만 정전기등의 이상전압으로부터
회로를 보호하기 위해서 접지를 하는것입니다.

요즘 접지를 안해도 되는 이유


접지 안해도 되는 이유는 요즘 콘센트에는 접지선이 이미 들어가 있어서 그쪽으로 전자제품에 해가되는 전기가 그쪽으로
흐르지만 하지만 전원플러그에 접지선이 포함되지 않았다거나 또는 콘센트에 접지선이 설치되어 있지 않으면 무용지물이겠죠...
낙뢰에 대한 대비도 있겠지만...일단 낙뢰에 맞으면 접지고 뭐고 차단기고 뭐고 소용이 없습니다..워낙 전압이 높기 때문에
소용이 없다고 해도 과언이 아닙니다. 전기설비에서의 접지와 전자회로의 접지와는 좀 다릅니다.
전기설비에서는 인체의 감전방지를 위한 것이고 전자회로의 접지는 오동작으로 일으키는 기생전류를 대지로 방전시키기 위함에 있습니다..컴퓨터의 수 많은 부품이 중에 몇개가 오동작을 하면 그 타격은 당해보면 아시겠죠..ㅎㅎ;;
제품이 최신형이건 구형이건 접지는 안해된다는 것은 정답이 아닙니다.맨 위에서와 같은 경우에서나 안해도 되겠지만
그렇지 아니할 경우에는 접지를 하는 것이 낫다고 할수 있습니다.

요즘 차단기가 잘되어있어서 과전류가 흐르면 차단기가 먼저 작동되지 않을까요?


차단기에는 합선(합선이되면 보통전류의 10배정도가 흐르게 됨)이나 누전, 과전류로 부터 인체 및 제품을 보호하기 설치하는것입니다. 허나 가전제품에 설치하는 접지는 정전기(전압은 엄청 높으나 전류가 없기때문에 차단기에서는 감지할수 없습니다.)나 외부에서 가해지는 전압으로 부터 전자제품의 회를 보호하기 위해서 접지를 하는 것입니다.예로 정전기의 높은 전압이 직류전압 5~10V정도 쓰는 전자회로에 통하게 된다면 회로의 모든 부분이 못쓰게 됩니다. 이를 방지하기 위해 접지를 하는 것입니다. 아파트같은 경우야 접지시설이 잘되어 있어서 콘센트도 접지선이 들어가 있어서 그나마 괜찮지만 그렇지 않을수 있는 가정집에서는 되도록 해주는게 좋습니다..

원래 콘센트에 접지가 다 되어있는걸로 아는데요


콘센트와 사용하시는 전자제품 전원 플러그에 접지선이 되어 있다면 않하셔도 됩니다..

스팀 컨텐츠 차단 풀기 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 16일 (수) 12:26)

https://support.steampowered.com/kb_article.php?ref=4917-GLXC-1280



카스 게임 옵션의 탭중에서 '컨텐츠 차단'이라는 탭이 있다.
이게 뭔지몰라서 호기심에 체크했다가 갑자기 적이 앉아서 죽고, 피가 겨자소스로 나온다.
풀려고 봤더니 무슨 암호를 넣으라는데 계정암호 넣어도 안풀리고 '컨텐츠 차단'이라는 암호는 설정한적도 없다.

스팀을 종료한뒤 아래 두가지 방법중 하나를 선택하여 레지스트리를 수정해주면 된다.

레지스트리 파일을 이용하기


새 파일을 만들어서 아래 내용을 넣고 파일확장자를 '.reg'로 한다음 실행시키면 적용된다:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings]
"User Token 2"=""

직접 레지스트리를 수정하기


  1. 시작메뉴의 실행에 'regedit'를 넣고 확인을 눌러서 레지스트리 편집기를 연다.
  2. 'HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings\'키를 찾아간다.
  3. User Token 2값을 제거한다.
  4. User Token 3값을 제거한다.

(!) 어떤 나라들은 폭력수위가 법으로 정해져 있다. 이런 나라에서 게임을 즐길때 '컨텐츠 차단'을 푸는행위는 불법이다. 예를들어 독일에서 '컨텐츠 차단'을 풀면 법을 위반하는것이다. 또한 어떤 서버들은 어드민이 '컨텐츠 차단'을 강제설정 해놓아서 서버에 접속하려면 '컨텐츠 차단'이 활성화되어있어야 한다.

윈도우7 작업표시줄에 있는 단축아이콘을 실행하는 단축키! edit

방금 발견함.

'시작키+숫자'키로 바로 실행할 수 있다. (왼쪽부터 1번)
이미 실행되어있는 프로그램일경우 최소화시키거나 맨앞으로 가져온다.

Putty 개인키와 공개키를 이용한 자동로그인 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 15일 (화) 12:22)

  • 공개키는 서버의 '~/.ssh/authorized_keys'에 넣는다.
  • 개인키는 컴퓨터에 저장하여 Putty에 추가한뒤 자동으로 로그인할 계정명을 설정한다.

서버의 '~/.ssh/authorized_keys'는 파일이름처럼 여러개의 공개키를 넣을 수 있다.

Puttygen으로 키 생성


  1. Puttygen 다운로드: puttygen.exe
  2. 키 비트수 설정 후 Generate 를 눌러서 키 생성.
  3. 마우스를 왔다리갔다리 흔들어주면 키가 생성된다.

빨간선 안의 값이 서버에 복사할 공개키이다.

생성된 키 저장


  1. 위 그림에서 빨간선 안의 공개키 값을 자기계정안의 .ssh/authorized_keys 로 복사한다.
  2. 퍼미션은 아무나 읽을 수 있게 해준다.
  3. puttygen 에서 save private key 버튼을 눌러 개인키를 저장해준다.

Putty에서 개인키 적용


위에서 저장시킨 개인키(Private key)를 아래와같이 적용시킨다.

Browse 버튼을 눌러서 키파일을 찾아 선택

자동 로그인할 아이디 설정


로그인할 아이디를 적어넣는다.

mysql 백업&복구 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 14일 (월) 20:30)

백업


$ mysqldump -u ID -p DBNAME (TABLENAME) > FILEPATH

ex)

$ mysqldump -u userid -p testdb > testdb.dump

Lock Tables 에러


mysqldump: Got error: 1044: Access denied for user 'userid '@'localhost' to database 'testdb' when using LOCK TABLES

--lock-all-tables 옵션을 주면 된다:
$ mysqldump -u userid -p --lock-all-tables testdb > testdb.dump

복구


$ mysql -u ID -p DBNAME (TABLENAME) < FILEPATH

ex)

$ mysql -u userid -p testdb < testdb.dump

BIOS 메뉴 edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 15일 (화) 06:42)

Execute Disable Function


Execute Disable Function는 CPU의 버퍼오버플로우 방지 기능을 설정하는 것으로 바이러스등의 감염을 줄이고 싶다면 enable로 하면 된다.
이기능은 Windows XP/Windows 2003 운영체제가 필요하다.
시스템등록정보 -> 고급 -> 성능 -> 데이터 실행 방지(DEP)에서 세부적인 세팅이 가능하다.
실사용하는데 별지장은 없다고 알려져 있다.

AHCI CD/DVD Boot Time out


사용시 속도가 향상되기 때문에 ODD인식을 안하고 넘어갈수도 있다.

BIOS EHCI Hand-Off


USB관련옵션이며 최적화가 되어있기때문에 안만져주셔도 된다.

Suspend Mode


절전모드 관련 기능. 최대 절전 모드 등을 선택할 수 있다.

Repost Video on S3 Resume


S3/STR 상태에서 상태 회복시 VGA바이오스의 POST를 다시 할지 여부를 선택한다.

ACPI 2.0 Support


ACPI 2.0 규격을 위한 추가 테이블을 더할것인지를 선택한다.

ACPI APIC Support


ASIC의 ACPI 지원기능의 사용여부를 설정한다.
ENABLED로 설정할경우 ACPI, APIC테이블 포인터는 RSDT포인터 리스트를 포함시킨다.

AGP aperture size


http://adelward.tistory.com/tag/Aperture%20Size

별거아니지만 잘못 건드리면 부팅조차 안되는 AGP aperture size 항목에 대해 알아보도록 하자
바로 AGP Aperture Size 라는 항목이다. 최근의 3D 게임은 화려한 그래픽과 웅장한 사운드로 무장하는 경우가 많은데, 3D 그래픽 구현시 보다 사실적인 오브젝트 구현을 위하여, 다수의 폴리건 및 대용량 다중 멀티 텍스쳐를 사용하는 경우가 점점 더 늘어나고 있다. 여기서 문제가 되는 점이 바로 텍스쳐 메모리의 한계 문제이다. 현재 국내에서 시판되고 있는 GeForce2/3 계열이나 RADEON 제품의 상위 모델들은 기본적으로 64MB 의 메모리를 가지고 있기에 그다지 부족함이 없다고 볼 수 있지만, 차세대 3D 게임에서는 이마저도 부족한 사양이 될 수도 있을 것이다.
(텍스쳐라는 것은 3D로 모델링된 물체의 표면에다가 2D의 비트맵 이미지를 덧씌워 주는 것입니다. 이게 뭐 그리 어렵냐 하면… 엄청 어렵습니다. 왜냐하면 3D공간상에서 볼 때 2D 텍스쳐들은 평면 입니다. 때문에 입체로 구성된 물체에 입히게 되면 왜곡이 일어나게 되죠. 그래서 텍스쳐를 만들때는 외곡되는 부분까지 생각해서 만들어줘야 합니다.)
관련 NAVER 지식인을 살펴보자면, 게이머들에게 흥미로운 사실하나가 밝혀진다.
"3d게임에서 다수의 옵젝트(캐릭터 몬스터등이 수많을때)가 존재해서 버벅일때 저의 경우 라뎅9000 64mb,aperture 64mb 일때 버벅이던것이(프레임 스킵이 아닌 버벅~!) 똑같은 상황에서 aperture 256mb일때 프레임 씹는건 여전히 심하지만 버벅이지 않더군요"

AGP는 다음과 같은 내용으로 구성된다


When using an AGP card the video memory on the graphics adapter is mapped into the 4 GB memory address space (above the region of the physical installed memory). Any accesses to this memory region are directly forwarded to the video memory, greatly increasing transfer rates. However in earlier days of video cards graphics memory was rather limited and ran out quickly (a single 32-bit 512x512 MIP-mapped texture consumes ~1.5 MB) so AGP added a mechanism to use the system`s main memory as additional storage for graphics data such as textures. This is what the AGP Aperture is. Usually directly below the mapped video memory the system reserves a contiguous space of addresses the size of your Aperture (no physical memory will be consumed at this time).

AGP그래픽카드를 사용할때 (컴퓨터에 장착된 메인 메모리를 초과하여) 4기가까지 맵핑(당연히 3D를 말하지요)이 된다. 메모리구역에 대한 어떤 접근도 비디오메모리로 직접 전달되어, 전송율을 매우 높여준다. 하지만 구형 비디오카드들의 메모리는 2M,4M,8M식으로 가용메모리가 제한되어있고, 금방 바닥나버린다.(32비트 512x512 MIP맵핑질감은 1.5메가를 차지한다) 그래서 AGP카드가 개발되어 남아도는 시스템의 메인메모리를 그래픽카드가 3D텍스쳐맵핑을 할때 쓰기시작했다. 이게 AGP APERTURE의 본질이다. 일반적으로 비디오메모리가 64M일때 이보다 낮은 값의 맵핑자료들은 그래픽카드자체에서 소화한다(그래서 메인메모리를 끌어다 쓰는 일은 없다)

When free video RAM is running low the system dynamically allocates 4K sized pages of system memory for use as AGP Aperture Memory. The problem with this dynamic allocation is that in many cases the pages are spread in a non-contiguous form throughout the physical memory. Accessing these pages directly would hinder performance because of scattering/gathering requiring extra logic. To get around this limitation the GART (Graphics Address Remapping Table) which is implemented in hardware in the Northbridge`s Memory Controller Hub provides an automatic physical-to-physical mapping between the scattered pages and the AGP Aperture.

가용 비디오메모리가 낮다면, 컴퓨터는 메인메모리에 능동적으로 4k정도의 공간을 AGP aperture memory로 할당하여준다. 문제는 능동적으로 메모리를 할당해준다는 것인데, 많은 경우에 본체의 메인메모리의 비연속적인 공간에 뿌려준다는 것이다.(하드디스크 조각모음안해준것과 비슷). 이런 페이지들을 일일이 찾아다니며 읽어들이는 것은 자료수집과 분산을 위한 또다른 기능을 요하므로 오히려 성능을 떨어뜨린다. 이런 한계를 극복하고자 GART라는 것이 개발되었는데 이것은 노쓰브리지의 메모리 컨트롤러 허브라는 것이 추가장착되어 분산된 맵핑자료들과 AGP aperture간에 자동적으로 실제메인메모리의 구역의 맵핑을 연결해주는 식으로 개선되었다.

Putty Styles(Colors) edit

개인위키에서 가져옴. (마지막 수정: 2009년 12월 15일 (화) 06:26)

Background: R69 G70 B86

Font: R85 G170 B255, Background: R0 G0 B0

Direct X 업데이트 edit

DirectX 최종 사용자 런타임 웹 설치 관리자:

http://www.microsoft.com/downloads/ko-kr/details.aspx?FamilyID=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=ko

http://www.teambh.net/bf_tip/1792853

DX를 왜 재설치하냐 윈도우에 설치되있으니 괜찮다 이러시는분들 계시는데. 잘못알고계시는겁니다.
DX가 표면적으로 버전업이되질않아보이지만 실제로는 여러가지 추가 라이브러리가 있기때문에 윈도우7에서도 다이렉트 업데이트를 필히 해주셔야됩니다.

blogger tricks edit

navbar 없애기


http://blogger-templates.blogspot.com/2005/01/remove-navbar.html

blogger는 기본적으로 navbar가 페이지 최상단에 있는데 상당히 거슬린다.

#navbar-iframe {
   display: none !important;
}

pre태그를 보기 좋게 바꾸기


워드프레스의 어떤 테마에서 가지고 왔다.

code, pre {
   font-family: "Courier New", Courier, Monaco, "Lucida Console", monospace;
   overflow: auto;
   background-color: #E7E7E7;
}
pre {
   -moz-border-radius: 5px;
   -khtml-border-radius: 5px;
   -webkit-border-radius: 5px;
   border-radius: 5px;
}
pre {
   padding: 1em;
   line-height: 1.5em;
   border-width: 1px;
   border-style: solid;
   border-color: #ddd;
   margin: 0.5em 0;
}

특히 'overflow: auto;' 옵션은 필수다.

헤더 타이틀에 링크걸기


헤더 타이틀을 클릭하면 루트페이지로 이동하는 관습이 있는데 'blogger Old Template Created by: Jason Sutter'템플릿은 기본적으로 링크가 걸려있지 않다.

(!) 이 설정은 'blogger Old Template Created by: Jason Sutter'템플릿 종속적일 수 있음.

Design -> Edit HTML 에서 'Expand Widget Templates'를 체크하면 생략된 부분이 펼쳐친다:
...
    <!--No header image -->
    <div id='header-inner'>
      <div class='titlewrapper'>
        <h1 class='title'>
          <a href='/'><b:include name='title'/></a>
        </h1>
...

old template 쓰기


나는 심플한 옛날 템플릿들이 더 맘에 든다.

Design -> Edit HTML 에서 밑에 'Old Template' 항목에서 고를 수 있다.

h1, h2, h3, h4 태그를 wikimedia의 그것처럼 설정하기


(!) 이 설정은 'blogger Old Template Created by: Jason Sutter'템플릿 종속적일 수 있음.

div.post-body.entry-content h1,
div.post-body.entry-content h2,
div.post-body.entry-content h3,
div.post-body.entry-content h4 {
   color: black;
   background: none;
   font-weight: normal;
   margin: 0;
   padding: .5em 0 .17em 0;
   border-bottom: 1px solid #aaa;
}
div.post-body.entry-content h1 { font-size: x-large;}
div.post-body.entry-content h2 { font-size: large;}
div.post-body.entry-content h3 { font-size: normal;}
div.post-body.entry-content h4 { font-size: small;}

Lock On: Flaming Cliffs 2 & DCS: Black Shark download and install edit

  • 'Lock On: Flaming Cliffs 2'(이하 FC2)는 1없이 'Lock On: Modern Air Combat'(이하 LOMAC)설치 후 설치가 가능하다.
  • 락온은 DCS와 별개의 게임이므로 DCS만 플레이 할것이라면 DCS만 설치하면 된다.
  • 멀티는 FC2와 DCS가 같이 할 수 있다. (한 서버에 접속하여 같이 플레이 할 수 있다.)

SKIDROW 립 안에 포함된 LOMAC설치 후 FC2를 설치하여 SKIDROW/bin 크랙 폴더를 덮어씌웠더니 문제가 발생했던것 같다.
이후 재설치를 반복하면서 삽질 하던중 TRiViUM 키젠으로 크랙 덮어씌움없이 스타포스에 시리얼 번호를 넣고 성공적으로 설치했던걸로 기억한다.
새로 받는다면 TRiViUM 립으로 받자. (그러나 LOMAC까지 포함되어 있는지는 모르겠다.)

(!) TRiViUM 립에는 키젠이 포함되어 있으므로 따로 키젠을 받을 필요는 없음.

최초 설치시 스타포스를 해제했는데 가끔가다 스타포스가 다시 깨어나는 경우가 있다. 이럴때마다 키젠으로 해제하면 된다.

weechat 간단 사용법 edit

IRC 네트워크 추가/삭제/수정 명령어


/server listfull
/server add oftc irc.oftc.net/6697 -ssl -autoconnect
/server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl
/server add freenode2 chat.eu.freenode.net/6667,chat.us.freenode.net/6667
/server add freenode3 irc.freenode.net -password=mypass
/server copy oftc oftcbis
/server rename oftc newoftc
/server del freenode
/server deloutq

ex) hanirc 추가

/server add hanirc irc.hanirc.org/6668

네트워크별 개별 설정


irc.conf

...
[server]
network1.addresses = "irc.server.org/6667"
network1.proxy
network1.ipv6
network1.ssl
network1.ssl_cert
network1.ssl_dhkey_size
network1.ssl_verify
network1.password
network1.sasl_mechanism
network1.sasl_username
network1.sasl_password
network1.sasl_timeout
network1.autoconnect
network1.autoreconnect = off
network1.autoreconnect_delay
network1.nicks = "nick,alter_nick2,alter_nick3"
network1.username = "username"
network1.realname = "realname"
network1.local_hostname
network1.command = ""
network1.command_delay
network1.autojoin
network1.autorejoin = on
network1.autorejoin_delay

network2.addresses = "irc.server.org/6667"
network2.proxy
network2.ipv6
network2.ssl
network2.ssl_cert
network2.ssl_dhkey_size
network2.ssl_verify
network2.password
network2.sasl_mechanism
network2.sasl_username
network2.sasl_password
network2.sasl_timeout
network2.autoconnect
network2.autoreconnect = off
network2.autoreconnect_delay
network2.nicks = "nick,alter_nick2,alter_nick3"
network2.username = "username"
network2.realname = "realname"
network2.local_hostname
network2.command = ""
network2.command_delay
network2.autojoin
network2.autorejoin = on
network2.autorejoin_delay
...

Part/Quit 메시지 수정하기


irc.conf

...
[network]
...
default_msg_part = "WeeChat %v"
default_msg_quit = "WeeChat %v"
...

플러그인


플러그인 추가는 ~/.weechat/ 하위 디렉토리에 스크립트 언어별로 디렉토리가 있으며 그곳에 넣고 따로 추가시키거나 하위 autoload라는 디렉토리안에 넣으면 weechat 시작시 자동으로 로드됨.

플러그인 다운로드 후 추가시키기


/(스크립트 언어 이름) add (플러그인 파일 경로)

buffer(버퍼)


채널마다 버퍼가 하나씩 생성되고 버퍼 이동은 Alt+숫자로 할 수 있다.

버퍼 순서를 서로 바꾸는 명령어


/buffer move (버퍼숫자)

ex) 6번 버퍼를 보고 있을때 /buffer move 2를 하면 내가 보고있는 6번 버퍼가 2번 버퍼가 되고 2번 버퍼가 6번 버퍼가 되어 서로 바뀜.

하나의 클라이언트에서 여러 IRC서버로 다중접속한 상태에서 core버퍼(맨처음 버퍼)에서 원하는 서버를 선택하기


/buffer (네트워크 이름)

(네트워크 이름은 서버를 추가할때 설정한 이름)

window(창)


창 가로 분할


/window splith (비율)

창 세로 분할


/window splitv (비율)

현재 창과 부모창 합치기


/window merge

로그


로그 파일은 ~/.weechat/log/ 에 저장된다.

weechat 설치 edit

데비안 lenny에서 apt-get으로 설치했더니 weechat최근버전에서 플러그인 API가 완전히 바뀌어 하위호완성이 없어 새 플러그인들을 사용할 수 없었다.
컴파일했더니 플러그인 사용을 위한 공유 라이브러리들(python, perl, ruby 등)이 설치가 안됨. 이거 뭐 컴파일 하나 하자고 죄다 깔 아야되나 고민하다가 그냥 백포트로 설치(/2011/05/aptitude.html)

$ aptitude -t lenny-backports install weechat-curses weechat-plugins

다른사람이 내 닉을 타이핑하면 호출되게끔 해주는 플러그인 하나 설치(http://www.weechat.org/scripts/source/stable/beep.pl/)

~/.weechat/perl/autoload$ wget http://www.weechat.org/files/scripts/beep.pl

Putty에서 소리가 나게끔 설정(/2011/05/screen.html)해주면 이제 다른사람이 내 닉을 타이핑할경우 삒!

KT 리버스DNS 등록하기 edit

DNS 서비스 운용지원 시스템: https://dms.kornet.net/jsp/mainFrame.jsp

블루투스 헤드셋 wiREVO S300K PDF Manual edit

wiREVO_S300K-001_Kor.pdf

전화접속 인터넷 연결 01412 POW WOW edit

‎2011‎년 ‎2‎월 ‎8‎일 ‎화요일, ‏‎오전 2:10:10
전화접속 인터넷 연결.txt


우리나라처럼 케이블이나 ADSL 등의 인프라가 대중화된 곳에서 전화접속은 사실 시대에 뒤떨어진 방식이라 권할 일이 없지요. 그런데, 간혹 외지에 출장을 갔을 때나, 앞서 올린 질문마냥 시골 노인네들께서 초고속 통신비 자체를 아까와 할 때는 할 수 없이 전화모뎀을 통해서 인터넷에 접속하는 방법이 불가피하답니다...

불과 1-2년 전까지만 해도 한국통신의 014** 망을 빌어서 이런 원클릭 인터넷 전화접속 서비스로 돈을 벌던 업체들이 한둘 있었는데, 지금은 수지가 맞지 않아서 모두 서비스를 중단한 것으로 알고 있습니다.

다만, 공기업적 성격을 갖고 있는 KT만큼은 설령 경제성이 없고 소수의 이용자가 필요로 하는 경우라 하더라도 서비스 자체를 없앨 수는 없기 때문에, 지금은 거의 유일하게 01412 번으로 전화모뎀을 이용한 인터넷 접속 서비스를 제공하고 있습니다. 서비스 이름은 [POW WOW] 라고 하고요...

저도 다른 이유로 작년에 우연히 이 서비스를 이용하기 위해 KT측에 전화로 문의해서 겨우 알아낸 방법이었는데요, 혹시 지금도 서비스가 가능한가 싶어 테스트를 해 보았는데, 2005년 2월 11일 현재 정상적으로 서비스되고 있더군요...

전화모뎀을 통해 접속하면 되고요, 분당 3원이 일반전화 요금에 추가된다고 하는데, 최고 월 4천원까지만 추가되는 모양입니다. (접속과정에서 이런 안내문이 나옵니다.)

다음은 KT측에서 제공해준 [파우와우] 전화모뎀 인터넷 서비스 접속방법 설명문입니다... 요즘은 대부분 윈도XP를 운영체제로 사용하기 때문에 Windows XP 환경을 기준으로 설명되어 있습니다. 참고하세요!


Windows XP에서
KT [POWWOW] 인터넷 전화접속 네트웍킹 설정방법
================================================
1) [제어판]-> [네트웍 및 인터넷 연결]-> [네트웍 연결] -> [새 연결 만들기] (다음)-> [인터넷에 연결] (다음) -> [연결을 수동으로 설정] (다음) -> [전화모뎀연결] (다음) -> 이름:임의값 주고(예:powwow) -> 전화번호 : 01412 -> 사용자이름/ 암호/ 암호확인:표기 않음 -> [바탕화면에 바로가기 만들기] 체크 -> 마침

2) 바탕화면에 생성된 아이콘을 더블 클릭 -> [속성] -> [보안]탭의 [대화형 로그온 및 스크립트]란의 [터미널 창 표시]에 체크 표기한 후 [확인]하고 나온 후 접속을 시도하면 됨.

3) 접속한 후 터미널창이 실행되고 “상품코드를 입력하세요”라는 메시지가 나오면 7번을 입력 -> 엔터 -> [F7] 또는 (완료D)키 엔터 -> 접속이 완료되면 익스플로러나 넷스케이프를 구동하여 인터넷을 사용하면 됨.

* 주의: 웹브라우저 종료와 무관하게 [전화접속] 아이콘을 다시 클릭하여 [연결 끊기] 버튼을 눌러서 전화 접속 상태를 종료시켜 주어야 합니다. 안 그러면 통화요금이 계속 올라가니까 주의하세요!

출처 : KT [POWWOW] 서비스 설명서

최근까지도 서비스 되고 있다. 올레!

와이파이 비밀번호 edit

2011‎년 ‎2‎월 ‎8‎일 ‎화요일, ‏‎오전 2:10:10
wifi.txt


http://boowoon.egloos.com/2633391

1) iptime, anygate, zio, linksys : 사설 무선랜으로 대부분 비밀번호 없습니다.
2) myLGnet, myLG070 : 123456789a, 987654321a, 1234567890, myLGNetfe07 중에 하나를 사용하시면 됩니다.
3) KT SSID, KT_WLAN : 1234567890, 123456789a, 123456789Cc
4) SK브로드 밴드 : a123456789
5) 세븐 일레븐 : 2127393302
6) Tbroadret : a123456789
7) 맥도날드 : 16005252 (매장 배달 번호와 같습니다.)
8) SKT 와이파이 : sktelecom
출처:갤럭시S 사용자 팁_어플 모음

삼성 블루투스 헤드셋 WEP150 PDF Manual edit

WEP150.pdf

티스토리 첨부파일의 리다이렉션 링크 edit

http://blogname.tistory.com/attachment/cfile2.uf@2076EC0B4CDA9E21345ACA.ext
↓
http://cfile2.uf.tistory.com/attach/2076EC0B4CDA9E21345ACA

미디어를 링크걸때(embed 태그 등)


http://blogname.tistory.com/attachment/cfile2.uf@2076EC0B4CDA9E21345ACA.ext
↓
http://cfile2.uf.tistory.com/media/2076EC0B4CDA9E21345ACA

table태그 화면 꽉차게 width, height 100% 주기 edit

2011‎년 ‎2‎월 ‎8‎일 ‎화요일, ‏‎오전 2:10:11
table태그 화면꽉차게 width, height 100%주기.txt


아래와 같이 HTML이 정의되어있으면 <table width="100%">로 화면 꽉차게 설정 안됨

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

mediawiki 복구 edit

압축백업된 mediawiki 디렉토리 압축 풀고 웹 루트에 넣고 phpmyadmin으로 DB생성.

DB 계정 생성


$ mysql -u root -p
Enter Password:
Mysql> grant all privileges on mediawiki.* to mediawiki@localhost identified by '******' with grant option;
Mysql> flush privileges;

DB덤프파일 압축 풀고 복구


$ mysql -u mediawiki -p mediawiki < wiki.db.dump

LocalSettings.php 수정


베이스 경로 설정

...
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath       = "/mediawiki";
...

DB 설정

...
## Database settings
$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "mediawiki";
$wgDBuser           = "mediawiki";
$wgDBpassword       = "******";
...

deb 메뉴얼 edit

소스에서 deb 패키지 빌드하기 edit

소스 디렉토리에서

source-dir$ dpkg-buildpackage -rfakeroot -uc -b

(dpkg-buildpackage 옵션 설명: /2011/05/dpkg-buildpackage.html, fakeroot??: /2011/05/fakeroot.html)

알아서 다 해준다.
deb파일은 소스 디렉토리 상위 디렉토리에 생성됨. (../source-dir)

finch에 pidgin-nateon 플러그인을 deb 패키징 후 설치 edit

서버에서 메신저를 돌려볼려던 생각은 옛날부터 해왔었는데 검색하던중 찾아낸 finch는 공교롭게도 pidgin의 CLI 버전이다.

pidgin-nateon 패키지의 의존성인 pidgin 대신(콘솔에선 설치해도 못씀) finch를 사용하기 위해서 finch 의존성으로 다시 패키징한다.

libpurple 설치


플러그인을 빌드하는데 libpurple이 필요. 데비안 lenny 기준 백포트로 설치

$ sudo aptitude -t lenny-backports install libpurple0

pidgin-nateon 플러그인 다운로드


svn에서 최신 리비전을 받는다

$ svn export http://dev.haz3.com/svn/nateon/trunk/ pidgin-nateon

pidgin-nateon 빌드


control 파일 추출을 위한 pidgin-nateon deb 패키지 빌드 (/2011/05/deb.html)


control 파일을 직접 만들 수 있다면 생략.

pidgin-nateon$ dpkg-buildpackage -rfakeroot -uc -b

control 파일을 만들 수 있다면 소스 빌드


pidgin-nateon$ ./configure --prefix=/usr
pidgin-nateon$ make
pidgin-nateon$ make DESTDIR="$PWD/build" install

(!) configure할때 prefix를 /usr 가 아닌 다른경로로 설정한다면 finch가 locale을 인식 못하는 문제가 발생한다.

finch-nateon deb 패키지 빌드


finch-nateon, finch-nateon/DEBIAN 디렉토리를 생성한다.

pidgin-nateon deb 패키지 빌드 하였다면


pidgin-nateon/debian/pidgin-nateon/DEBIAN/control -> finch-nateon/DEBIAN/control 복사 후 수정

...
Package: pidgin-nateon -> finch-nateon
...
Depends: pidgin -> finch
...

pidgin-nateon/debian/pidgin-nateon/usr -> finch-nateon/usr 복사한다.

pidgin-nateon 소스를 빌드하였다면


control 파일을 finch-nateon/DEBIAN/ 에 넣고 빌드된 바이너리들을 finch-nateon/ 에 넣어준다.

CUI인 finch에서는 필요없는것들을 제거해준다.

  • finch-nateon/usr/share/pixmaps (finch는 콘솔 인터페이스이므로 이미지는 필요없다.)
  • finch-nateon/usr/share/doc (문서따위..)

finch-nateon 상위 디렉토리(pidgin-nateon)에서 dpkg-deb으로 빌드

pidgin-nateon$ dpkg-deb --build finch-nateon

생성된 finch-nateon.deb 의 이름을 알맞게 수정

finch-nateon.deb -> finch-nateon_2.5.6-svn143_i386.deb

패키지 설치


$ sudo dpkg -i finch-nateon_2.5.6-svn143_i386.deb

빌드된 finch-nateon 플러그인 deb 패키지 파일 다운로드 링크



참고 링크



스크린샷



Newer -> <- Older