'Tips'에 해당되는 글 94건
- 2008년 구글, 마이크로소프트 연봉 (대충) 2010/06/18
- Putty color scheme 2010/05/20
- 근로소득세 납부여부 확인 2010/05/02
- OpenCapture : 유용한 화면 캡쳐 프로그램 2010/04/18
- bash shell 프롬프트용 변수 2010/04/16
- cygwin + puttycyg로 윈도우에서 터미널 환경 꾸미기 2010/04/13
- 엑셀 매크로 : 그림을 숨기기/복구하기 (1) 2010/04/02
- puttycyg cygwin 터미널로 쓸 수 있음 2010/03/23
- 교통카드 녹이기 (1) 2010/01/16
- 바나나요리 (2) 2009/12/29
2008년 구글, 마이크로소프트 연봉 (대충)
Putty color scheme
근로소득세 납부여부 확인
국세청홈택스서비스(www.hometax.go.kr) > 조회서비스 > 세금신고내역조회 > 지급명세서
OpenCapture : 유용한 화면 캡쳐 프로그램
http://simples.kr/bbs/group.php?gr_id=11
가장 많이 쓰는 기능 : Ctrl+Shift+A 면 현재창 캡쳐된다.
캡쳐 후에 바로 편집 창이 떠서, 필요 없는 부분 지우고 필요 부분만 잘라서 복사할 수 있다.
bash shell 프롬프트용 변수
bash man page에서 퍼옴.
PROMPTING
When executing interactively, bash displays the primary prompt PS1 when
it is ready to read a command, and the secondary prompt PS2 when it
needs more input to complete a command. Bash allows these prompt
strings to be customized by inserting a number of backslash‐escaped
special characters that are decoded as follows:
\a an ASCII bell character (07)
\d the date in "Weekday Month Date" format (e.g., "Tue May
26")
\D{format}
the format is passed to strftime(3) and the result is
inserted into the prompt string; an empty format results
in a locale‐specific time representation. The braces are
required
\e an ASCII escape character (033)
\h the hostname up to the first ‘.’
\H the hostname
\j the number of jobs currently managed by the shell
\l the basename of the shell’s terminal device name
\n newline
\r carriage return
\s the name of the shell, the basename of $0 (the portion
following the final slash)
\t the current time in 24‐hour HH:MM:SS format
\T the current time in 12‐hour HH:MM:SS format
\@ the current time in 12‐hour am/pm format
\A the current time in 24‐hour HH:MM format
\u the username of the current user
\v the version of bash (e.g., 2.00)
\V the release of bash, version + patch level (e.g., 2.00.0)
\w the current working directory, with $HOME abbreviated
with a tilde
\W the basename of the current working directory, with $HOME
abbreviated with a tilde
\! the history number of this command
\# the command number of this command
\$ if the effective UID is 0, a #, otherwise a $
\nnn the character corresponding to the octal number nnn
\\ a backslash
\[ begin a sequence of non‐printing characters, which could
be used to embed a terminal control sequence into the
prompt
\] end a sequence of non‐printing characters
예를 들어
$export PS1='\s−\v\$ '
-bash−3.2$
$ export PS1='\T−\v\$ '
01:28:29−3.2$
$ export PS1='\W \@\$ '
~ 01:40 PM$
cygwin + puttycyg로 윈도우에서 터미널 환경 꾸미기
cygwin으로 리눅스 비슷한 환경을 쓰려면 쓸만한 터미널이 문제입니다.
putty 를 쓰려면 ssh서버를 깔고 셋팅해야되는 단점이 있죠
puttycyg로 ssh를 통하지 않고 putty터미널을 cygwin 터미널-cygterm 으로 쓸 수 있습니다.
ssh 서버를 깔지 않아도 되고 커맨드창처럼 윈도 프로그램이 실행됩니다.
다음처럼 윈도 탐색기에서 터미널을 바로 열 수도 있죠.
cygwin 설치
http://www.cygwin.com/ 에서 cygwin setup 실행.
본인은 미러를 추가하였음.
http://ftp.daum.net/cygwin/
http://ftp.sayclub.co.kr/pub/cygwin/
putty cyg 설치
http://code.google.com/p/puttycyg/
puttycyg 실행
프로토콜을 cygterm으로 선택. 커맨드 라인은 – 로 합니다.
한글 설정
한글을 볼 수 있기 위해 putty 설정을 UTF8로 합니다.
이렇게 설정하기 전과 후 화면. 한글 보입니다.
ls에서 8비트문자 볼 수 있게 –show-control-char를 추가합니다.
평소 옵션으로 만들기 위해 ~/.bashrc 수정
한글 쓸 수 있게 하기 위해 ~/.inputrc 수정
# Allow 8-bit input/output
set meta-flag on
set convert-meta off
set input-meta on
set output-meta on
vi에서는
set encoding=cp949 termencoding=utf-8 fileencoding=cp949
해줘야 됩니다.
cp949(한글윈도우기본)인코딩을 쓰고 터미널은 UTF8을 쓰며 파일 저장은 cp949로 한다고 명시해야 평소쓰던 대로 잘 쓸 수 있음.
(수정하는 파일의 인코딩이 원래 utf8였으면 vi로 파일 열 때도 자동으로 파일 저장 옵션이 utf8로 변경됩니다. 위의 것은)
vim 설정
cygwin setup에서 vim 설치를 해야 합니다.
.vimrc에 저는 이렇게 했습니다.
"set encoding=cp949
set backup
" for hangul
set encoding=cp949 termencoding=utf-8 fileencoding=cp949
set fileformats=dos,unixset backupdir=~/.vim/backup
set scrolloff=3
syntax on
set bg=dark
set ruler
set cindent
set tags=./tags,tags,../tags
set sw=4
set ts=4
set smarttab
set hlsearch
set incsearch
set autowrite
set nostartofline
set backspace=indent,eol,start
set backspace=2
set bioskey
set showmatch
au BufNewFile,BufReadPost Makefile set noexpandtab
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
set formatoptions=croql
"set textwidth=80
set laststatus=2
map <F1> K
map <F2> mk[[?^[A-Za-z_].*(<CR>V"ky`k:echo "<C-R>k"<CR>
"fold
map <F3> v%zf
"unfold
map <F4> zo"Show prototype of the function
map <F8> [i
"Go to the declaration
map <F9> gd
"Go back
map <F10> ''
"Go to the definition
map <F11> <C-]>
"C-scope search from the files
map <S-F11> <C-\>s
"Go back from F11
map <F12> <C-t>" for mlcscope
set csprg=/usr/bin/mlcscope
" for mouse click
"set mouse=a
set mouse=n
"set mouse=v
팁 – 윈도 프로그램 실행시키기
path에 지정된 프로그램은 터미널에서 실행 가능합니다. cygwin+ssh로 했을 때는 할 수 없던 기능이죠
예를 들어 현재 경로에서 탐색기를 띄우려면
$ explorer .
을 실행하면 됩니다.
계산기는 calc
레지스트리 에디터는 regedit
특정 파일을 노트패드로 보고 싶으면
notepad 내파일.txt
하면 됩니다. :-)
쉽죠. 편리하고.
팁 – 커맨드라인에서 파일 이름 대소문자 구분 안하기
윈도우는 파일 이름에 대소문자 구분 안하니까
.bashrc에
shopt –s nocaseglob
추가하고
.inputrc에
set completion-ignore-case on
하면 된다.
cscope 사용
mlcscope란 패키지가 cygwin 기본이 되어있네요
예전엔 cscope 소스로 빌드해서 썼었는데
이거 설치하고
$ mlcscope -R
하면 소스들로부터 cscope.out 파일 생성됩니다.
vi에서 사용하려면 http://wiki.kldp.org/wiki.php/VimCscopeTutorial 참고하시면서 http://cscope.sourceforge.net/cscope_maps.vim 에서 cscope_maps.vim 파일 내려받아 ~/.vim/plugin 아래에 복사해두고
.vimrc 에서
" for mlcscope넣어주면 됩니다.
set csprg=/usr/bin/mlcscope
기존에 ctags로 사용하던 Ctrl+] Ctrl+t 가 cscope.out을 보고 동작하는 것도 보실 수 있습니다.
Tip: bash here
http://gleamynode.net/articles/1543/bas ··· puttycyg
PuTTYcyg를 이용한 “Bash Here” 컨텍스트 메뉴
이렇게 하면 탐색기에서 해당 폴더에서 마우스 오른클릭으로 bash창을 puttycyg로 띄울 수 있습니다.
- PuTTYcyg 최신 버전을 받아 C:\Cygwin\bin 디렉토리에 압축을 풀어 넣습니다.
- Cygwin 설치 프로그램에서 ‘chere‘ 패키지를 설치합니다.
- bash-here.zip을 다운로드합니다.
- 받은 ZIP 파일에서 bash-here.reg 파일을 풀고, 더블클릭해 시스템 레지스트리에 합칩니다.
- PuTTYcyg 최신 버전을 받아 D:\programs\puttycyg 디렉토리에 압축을 풀어 넣습니다.
- Cygwin 설치 프로그램에서 ‘chere‘ 패키지를 설치합니다.
- bash-here(2).zip을 받아서 bash-here.reg 파일을 풀고, 더블클릭해 시스템 레지스트리에 합칩니다.
Tip: bash 프롬프트
TITLEBAR='\[\e]0;\w\007\]'; # Title bar(xterm이나 putty)에 현재 경로 나오도록.
#TITLEBAR='\[\e]0;\h \w\007\]'; # 사용자명과 현재 경로 나오도록.
#TITLEBAR=""
export PS1=${TITLEBAR}'\[\e[32m\]Daniel \[\e[33m\]\W\[\e[0m\] \$ '
c 라이브러리, posix man 페이지 보기
터미널에서 한글 보기


엑셀 매크로 : 그림을 숨기기/복구하기
http://www.developertags.com/microsoft-excel/452263/
Sub test()
s$ = "Rectangle 1"
HideUnhide s, False
Stop
HideUnhide s, True
End Sub
Sub HideUnhide(sName As String, bVisible As Boolean)
ActiveSheet.Shapes(sName).Visible = bVisible
End Sub
이렇게 쓰면 된다
토글 하려면 이렇게 쓰면 된다. (사실 Visible은 boolean 형식이 아니라 MsoTriState로 되어있다.
ActiveSheet.Shapes("Picture 1").Visible = msoTriStateToggle
처음엔 Selection쓰려고 했는데 오류났는데 인터넷 찾아보니 no need to select 라고 하는군
Sub Button2_Click()
'
' Button2_Click Macro
s$ = "Picture 1"
HideUnhide s, TrueEnd Sub
Sub Button3_Click()
s$ = "Picture 1"
HideUnhide s, False
End SubSub HideUnhide(sName As String, bVisible As Boolean)
ActiveSheet.Shapes(sName).Visible = bVisible
End SubSub Button4_Click()
ActiveSheet.Shapes("Picture 1").Visible = msoTriStateToggle
End Sub
-
Daniel
매크로의 인증서는,
http://ozman.tistory.com/101
참조
(매크로 실행을 위해선 인증서를 가지고 코드에 사인 하는 게 좋음.)
개인인증서는 공인루트인증기관의 인증을 거치지 않았으므로 도구->매크로->보안 에서 보안레벨을 보통으로 바꿔야 함.
puttycyg cygwin 터미널로 쓸 수 있음
http://code.google.com/p/puttycyg/
Use PuTTY as a local Cygwin terminal.
PuTTYcyg is a patched version of PuTTY that, in addition to telnet, rlogin, ssh, and serial connections, can also be used as a local Cygwin terminal instead of the Windows console or xterm. See README.txt for more information.
여기 에서 추천받았습니다
cygwin 사용시 ssh서버 안깔고 로컬 터미널로 사용가능이라는 솔깃한 점이 :-)
체크해봐야지
교통카드 녹이기
따라해보려구요
신용카드를 녹이기 전에 카드번호 유효기간 CSV 등등의 정보를 미리 따로 적두세요.
아니면 앞뒤로 스캔이나 복사를 해두셔도 되고요.
그래야 인터넷을 통한 거래를 하실수 있으니깐요.
방법은 명함통이 젤 좋더라구요.
거기에 카드넣고 아세톤으로 담그고 명함통 뚜껑 닫고
냄비에 가열해놓은 물에 명함통을 넣고 냄비 뚜껑 닫고
한 20~30분 방치해놓은후에 꺼내보면 녹아 있습니다.
출처 : 한국 스마트폰 사용자 모임, 마이미츠 - http://www.mymits.net/zb/use/2094

출처 : 한국 스마트폰 사용자 모임, 마이미츠 - http://www.mymits.net/zb/lecture/1825
바나나요리
바나나를 익히면 더 달아집니다.
간단히 전자렌지에 덥혀먹는 건 하는데요
한 개를 껍질을 까서 1분정도 조리하면 반쯤 녹고(익으면 형체가 사라집니다)
따듯하고 달달한 홍시같이 됩니다. 찻수저로 퍼먹으면 되죠.
식후에 단 것이 땡길 때 후식으로 하나씩 먹으면 맛있습니다.
칼로리가 높은 것은 주의하시구요
바나나를 활용한 몇 가지 요리가 있네요.
바나나 구워먹고 갈아먹기 :팬케익, 셰이크
바나나요리만들기 : 머핀 등
달콤한 필리핀 바나나 디저트 투론 (Turon) :튀김요리. 라이스페이퍼를 쓰는 것이 기발하네요. 한번 해봐야지 ^^
바나나구이(역시 오븐에)
putty_color.zip














I was senseless and ignorant; I was a brute beast before you.
Yet I am always with you; you hold me by my right hand.
You guide me with your counsel, and afterward you will take me into glory.
Whom have I in heaven but you?
I only have you in my life