git cvsimport 노트

$ git cvsimport -k -m -v <CVS 모듈명>
  • -k Kill Keywords라고 사용하는게 좋다고 한다.
  • -m Detect Merges 역시 잘….
  • -v Verbosity
  • -d CVS와 같게 CVSROOT는 -d로 지정.

개인적으로 커스터마이징한 불여우

개인적인 기록을 위해 남겨두는 불여우 커스터마이징.

애드온
Adblock Plus, Nosquint, Flashblock, Hide Menubar 정도를 쓰네요.

about:config

  • network.http.pipelining HTTP 파이프라이닝으로 네트워크 응답속도 증가하므로 true
  • browser.tabs.closeWindowWithLastTab 탭 전부 닫아도 창 자체는 열어둘 수 있도록 false

검색엔진 목록
Google, Wikipedia, Youtube로 제한합니다.

VI-Keybinding
/usr/lib/firefox*/omni.jar 압축 풀어서 ./chrome/toolkit/content/global/platformHTMLBindings.xml 열어서 아래 사항을 추가. Vimperator는 브라우저를 지나치게 바꿔버리기 때문에 별로 안 좋아합니다.

...
  <binding id="browser">
    <handlers>
...
      <handler event="keypress" key="k" command="cmd_scrollLineUp" />
      <handler event="keypress" key="j" command="cmd_scrollLineDown" />
      <handler event="keypress" key="l" command="cmd_scrollRight" />
      <handler event="keypress" key="h" command="cmd_scrollLeft" />

쉘 스크립트에서 getopt 사용하는 법

#!/bin/sh

## 도움말 출력하는 함수
help() {
    echo "splt [OPTIONS] FILE"
    echo "    -h         도움말 출력."
    echo "    -a ARG     인자를 받는 opt."
    echo "    -b ARG     인자를 받는 opt2."
    exit 0
}
while getopts "a:b:h" opt
do
    case $opt in
        a) arg_a=$OPTARG
          echo "Arg A: $arg_a"
          ;;
        b) arg_b=$OPTARG
          echo "Arg B: $arg_b"
          echo "$arg_b"
          ;;
        h) help ;;
        ?) help ;;
    esac
done

# getopt 부분 끝나고 난 후의 인자(FILE) 읽기
shift $(( $OPTIND - 1))
file=$1
echo "$file"

Perl 자료구조

Perl은 자료형 선언하는 방식이 맨날 헷갈려서… struct, array, 이런 식으로 쉽게 풀어쓰면 외우기가 쉬울텐데 단순한 기호라서 외우기가 쉽지 않네요.

# 단순 배열 (At @ 사용)
@an_array = ('elem1', 'elem2');
$an_array[0] = 'new_elem1';

# 단순 해시 (Percent % 사용)
%a_hash = ('key1' => 'item1', 'key2' => 'item2');
$a_hash{'key2'} = 'new_item2';

# 배열 참조 (Square brackets[] 사용)
$array_ref = ['elem1', 'elem2', 'e3'];
$array_ref = \@an_array;
@$array_ref = (1, 2);

# 해시 참조 (Curly braces {} 사용)
$hash_ref = {'key1' => 1, 'key2' => 7};
$array_ref = \%a_hash;
%$hash_ref = ('k1' => 'elem1');

# 해시의 항목이 배열의 해시 (전부 참조형으로...)
$everything = {
    'hash1' => {
        'key1' => [ 'item1', 'item2' ],
        'key21' => [ 'object1', 'object2' ],
    },
    'hash2' => {
        'key77' => [ 1, 2 ],
        'key3' => [ 'object1', 'object2' ],
    },
};
팔로우

모든 새 글을 수신함으로 전달 받으세요.