기본 콘텐츠로 건너뛰기

라벨이 OS X인 게시물 표시

OS X 터미널에서 tmux 사용시 pane 크기 조절

http://superuser.com/a/660072  글 참조. OS X 에서 tmux 사용시 나눠놓은 pane 크기 조정할 때 원래는 ctrl+b, ctrl+↑←→↓ 로 사이즈를 조정하는데 기본 터미널 키 입력이 조금 문제가 있다. 키 매핑을 다시 하자 Preferences(cmd+,) > Profile >  변경하고자 하는 Theme 선택 > Keyboards 로 들어가서 \033[1;5A \033[1;5B \033[1;5C \033[1;5D 를 순서대로 ↑↓→←순으로 매핑이 되도록 하면 된다. +를 누르고 Key에 해당 화살표키와 Modifier에 ctrl 선택 한 후 <esc>, [, 1, ;, 5 까지 한키 한키 입력 후 A,B,C,D를 써준다. 잘못 입력했을 땐 당황하지 말고 Delete on character 버튼을 눌러 수정하도록 하자. 그리고 다시 tmux에서 ctrl+b, ctrl+↑←→↓로 사이즈를 조절해보자. 잘 된다.

Arduino+Bluetooth 연결 후 터미널에서 테스트하기

Arduino를 보고 있다. Bluetooth 모듈하고 연결은 tx,rx를 서로 교차연결하고 전원만 받아주면 만사 오케이더라. 이렇게 해서 이렇게 하긴 했는데 테스트 하기 위해선 nc 같은 터미널로 하면 쓸 수 없을까 싶었는데 그냥 screen 명령을 쓰면 되더라. Bluetooth Pairing 후 $ ls /dev/tty.* /dev/tty.Bluetooth-Incoming-Port /dev/tty.HC-06-DevB /dev/tty.Bluetooth-Modem 해보니 테스트 용으로 쓰고 있는 HC-06-DevB가 보이더라. $ screen /dev/tty.HC-06-DevB  으로 접근하면 시리얼 터미널로 돌입한다. 에코가 있으면 에코를 쏠테고 아니면 그냥 받아준다. 뒤에 전송속도를 써서 $ screen /dev/tty.HC-06-DevB 9600 이렇게 접근도 가능하다. 커맨드를 치고 enter를 치면 텍스트를 전달한다. 테스트를 마치고 나갈땐 ctrl+a, ctrl+\ 를 입력하면  Really quit and kill all your windows [y/n] 하고 물어본다. y를 눌러서 나가면 된다.

SoX Library 컴파일하기(for OS X)

./osxbuild 실행 오류 $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" $ brew install automake 재시도 $ ./osxbuild configure.ac:21: installing './compile' configure.ac:10: installing './config.guess' configure.ac:10: installing './config.sub' configure.ac:12: installing './install-sh' configure.ac:12: installing './missing' libgsm/Makefile.am:35: error: Libtool library used but 'LIBTOOL' is undefined libgsm/Makefile.am:35:   The usual way to define 'LIBTOOL' is to add 'LT_INIT' libgsm/Makefile.am:35:   to 'configure.ac' and run 'aclocal' and 'autoconf' again. libgsm/Makefile.am:35:   If 'LT_INIT' is in 'configure.ac', make sure libgsm/Makefile.am:35:   its definition is in aclocal's search path. libgsm/Makefile.am: installing './depcomp' lpc10/Makefile.am:8: error: Libtool library used but 'LIBTOOL' is undefined ...

XCode OS X Application : Drag & Drop 후 파일 처리

개인적으로 필요한 유틸이 있어서 appleScript 로 만들까하다가 XCode 4.4 로 OS X Application 을 만들어 본 적이 없어서 Drag & Drop, Pipe, File 처리 같은 걸 해봤다. xib 에 드래그할 대상인 NSImageView 를 놓고 그 NSImageView 를 Customize 한 NSCImageView 를 만들어서 구현했다. performDragOperation 이벤트에서  NSPasteboard  *paste = [sender draggingPasteboard]; 로 NSPasteboard 객체에 드래그 한 것들을 가지고 NSFilenamesPboardType 인것들을 타입으로 추출하여 NSData로 받았다. NSArray *fileArray = [paste propertyListForType : @"NSFilenamesPboardType" ]; 파일 목록은 propertyListForType으로 string array 를 받을 수 있다. http://borkware.com/quickies/one?topic=nstask shell 실행하고 결과 stdout 을 받는 것 처리하는데 위의 링크를 참조했다.   NSTask *task = [[ NSTask   alloc ]  init ];   [task  setLaunchPath : @" <SHELL COMMAND> " ]; NSTask 를 setLaunchPath 메서드를 사용하여 콜할 커맨드를 지정하고   [task  setArguments :[ NSArray   arrayWithObjects : <@args> , file,  nil ]]; N개의 argument 를 지정   NS...