Makefile에서 if 문 쓰기 - ifeq

Posted at 2008/03/19 09:56 // in Tips/Utility programs // by Daniel
Makefile 작성하다보면 if를 써서 조건빌드나 특정 조건에서 변수 값을 다르게 하고 싶을 때가 있습니다.

ifeq를 쓰면 됩니다.

예를 들어 OS가 unix이냐 linux이냐에 따라 C compiler의 이름을 cc와 gcc로 구별하고 싶을 때는

OS=`uname -s`
ifeq ($(OS),Linux)
CC=gcc
CFLAGS = -Wall -m32 -I .
else
CC=gcc
CFLAGS = -w 0 -I .
endif

이와 같이 쓰면 동작합니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

wget으로 웹페이지에 링크돼 있는 문서들 다 받기

Posted at 2008/03/06 13:43 // in Tips/Utility programs // by Daniel
리눅스의 유틸리티 wget은 http나 https, ftp로 파일을 다운로드 받을 때 커맨드라인에서 쉽게 받을 수 있는 프로그램입니다.
웹페이지가 있고 그 페이지에 여러 페이지나 자료의 링크가 있는데 이걸 다 받고 싶은 경우 wget 의 옵션을 사용하면 됩니다.
(예를 들어 강의 페이지의 자료들을 한꺼번에 받고 싶을 때 말이죠)

일단 해당 페이지를 받습니다.
$ wget URL

예를 들어
$ wget html://rommance.net/misc_path/a.html

그 다음 이 웹 페이지에서 나온 링크들을 전부 받습니다.
이제 사용하는 옵션은
-i : 뒤에 나오는 파일 안에 있는 URL을 다 다운로드 합니다.
-F : 파일을 html로 인식한다.
-B : Base URL(상대경로의 링크일 때 기본 베이스 주소)
이 세가지를 쓰면 됩니다.

$ wget -i a.html -F -B http://rommance.net/misc_path/

이런 식으로 사용하면 a.html 안에 있는 링크된 페이지와 자료들이 다 다운로드 됩니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

synergy: 키보드 마우스 공유 프로그램

Posted at 2008/02/20 13:15 // in Tips/Utility programs // by Daniel

Unix, Windows, OSX를 지원하는 키보드 마우스 공유 프로그램입니다. 오픈소스 프리웨어입니다.

http://synergy2.sourceforge.net/

Synergy lets you use one keyboard and mouse across multiple computers. To do so it requires that all the computers are connected to each other via TCP/IP networking. Most systems come with this installed.


한쪽 PC가 서버를 맡고 나머지 PC들은 클라이언트가 돼 붙게 됩니다. (ip로 접속함)
리눅스에서는 quicksynergy라는 프로그램이 있어서 gui로 설정할 수 있게 해줍니다.

꽤 오래전부터 엔지니어들 사이에서 많이 쓰이고 있는 프로그램입니다.
예를 들어 책상에서 PC의 마우스 키보드를 치워놓고 노트북의 키보드 마우스를 통해 PC에 입력할 수 있습니다.

http://jwmx.tistory.com/833
  • Cape diem :: Microsoft Windows와 리눅스 시스템에서 사용
  • 호박동네 :: Microsoft Windows와 맥 시스템에서 사용
    사용자 삽입 이미지


  • 크리에이티브 커먼즈 라이센스
    Creative Commons License

    mp3 재생속도 조절 변환 프로그램. 사용법

    Posted at 2008/02/18 22:47 // in Tips/Utility programs // by Daniel
    http://blog.naver.com/delicacy74/30016028470

    아버지는 mymp3를 쓰셔서 재생속도를 다르게 하고 곰 녹음기로 녹음하셨지만..

    위 프로그램이 인코딩이 되는듯..
    # 프로그램 제작사 : http://www.audio4fun.com/

    ....

    위에 써 놓은 3가지 프로그램 모두 내가 원하는 기능을 갖고 있다.

    두번째와 세번째 프로그램은 첫번째 프로그램보다 더 많은 기능을 갖고 있는 것 같다.

    첫번째 프로그램인 "AV MP3 Player Morpher" 만으로도 재생 속도 변환은 충분하다.


    이 프로그램의 주목적은 오디오에 각종 효과를 주기 위한 것 같다.

    그러나 나에게 그러한 기능은 아직까지 전혀 필요없다.

    재생 속도 조절만 되면 된다.
    .....

    (여러 파일 변환할 때는 저장경로를 다른 디렉토리로 바꾸고 출력 MP3 파일 포맷을 원하는 세팅으로 바꿔준다)








    크리에이티브 커먼즈 라이센스
    Creative Commons License

    FCrackZip

    Posted at 2008/02/18 22:27 // in Tips/Utility programs // by Daniel
    zip 압축 파일 암호 풀기
    FCrackZip

    리눅스용과 윈도우용(커맨드창)이 있습니다.
    오픈소스, 무료 프로그램입니다.

    무식하게 aaaaa부터 찾아갑니다.

    http://www.goof.com/pcg/marc/fcrackzip.html

    NAME

    fcrackzip - a Free/Fast Zip Password Cracker  

    SYNOPSIS

    fcrackzip [-bDBchVvplum2] [--brute-force] [--dictionary] [--benchmark] [--charset characterset] [--help] [--validate] [--verbose] [--init-password string/path] [--length min-max] [--use-unzip] [--method name] [--modulo r/m] file...  

    DESCRIPTION

    fcrackzip searches each zipfile given for encrypted files and tries to guess the password. All files must be encrypted with the same password, the more files you provide, the better.  

    OPTIONS

    -h, --help
    Prints the version number and (hopefully) some helpful insights.
    -v, --verbose
    Each -v makes the program more verbose.
    -b, --brute-force
    Select brute force mode. This tries all possible combinations of the letters you specify.
    -D, --dictionary
    Select dictionary mode. In this mode, fcrackzip will read passwords from a file, which must contain one password per line and should be alphabetically sorted (e.g. using (1)).
    -c, --charset characterset-specification
    Select the characters to use in brute-force cracking. Must be one of

      a   include all lowercase characters [a-z]
      A   include all uppercase characters [A-Z]
      1   include the digits [0-9]
      !   include [!:$%&/()=?[]+*~#]
      :   the following characters upto the end of the spe-
          cification string are included in the character set.
          This way you can include any character except binary
          null (at least under unix).
    

    For example, a1:$% selects lowercase characters, digits and the dollar and percent signs.

    -p, --init-password string
    Set initial (starting) password for brute-force searching to string, or use the file with the name string to supply passwords for dictionary searching.
    -l, --length min[-max]
    Use an initial password of length min, and check all passwords upto passwords of length max (including). You can omit the max parameter.
    -u, --use-unzip
    Try to decompress the first file by calling unzip with the guessed password. This weeds out false positives when not enough files have been given.
    -m, --method name
    Use method number "name" instead of the default cracking method. The switch --help will print a list of available methods. Use --benchmark to see which method does perform best on your machine. The name can also be the number of the method to use.
    -2, --modulo r/m
    Calculate only r/m of the password. Not yet supported.
    -B, --benchmark
    Make a small benchmark, the output is nearly meaningless.
    -V, --validate
    Make some basic checks wether the cracker works.
    크리에이티브 커먼즈 라이센스
    Creative Commons License