GateOne - HTML5 ssh client.

Surface RT를 8.1로 올린 뒤로 jailbreak가 안되는 바람에 Web기반 ssh client를 이것저것 찾아봤다.
위키를 찾아보니 다양한 프로젝트들이 있어 이것저것 살펴봤는데 GateOne이 가장 마음에 들었다. 일단 생각나는 장점은 아래와 같다.

  1. 오픈소스이다.
  2. github으로 소스 관리를 한다.
  3. 서버사이드가 파이썬으로 짜여있다.
  4. 클라이언트 UI가 섹시(?)하다.
  5. 플러그인 없이 HTML5로만 구현되었다.
  6. SSL을 쓸 수 있다.
  7. 서버를 실행시킬때 루트권한이 필요 없다.

정도가 될것 같다.

특히 과거 오픈소스 프로젝트로 서버 프로그램을 테스트하다가 해킹당했던 기억때문에 서버를 실행시킬때 루트권한이 필요 없다.가 매력적이었다.
virtualenv를 이용하여 설치하고, 실행옵션으로 넣을 수 있는 몇가 옵션만 변경시켜주면 쉽게 실행시켜줄 수 있다.

아쉬운점이 있다면 한글 입력이 불편하다는 건데, 다른 대부분의 클라이언트들은 한글 폰트가 깨져나오는 것을 보면 큰 단점은 아니라고 생각한다.

예전부터 만들고 싶었던 부류의 물건이기도 하고, 깔끔하게 구성되어 있어서 한동안 내 장난감은 이게 될것 같다.


레인지로버 무선 마우스

개발용 블로그와 그 외의 일상생활들에 대해 적는 블로그를 나누기 시작했다.

본래 있던 글은 http://diary.seulgik.im/2013/09/blog-post.html로 이동되었다.


Surface RT 구매

개발용 블로그와 그 외의 일상생활들에 대해 적는 블로그를 나누기 시작했다.

본래 있던 글은 http://diary.seulgi.kim/2013/08/surface-rt.html로 이동되었다.


Structure and Interpretation of Vim - mparm_T

 Before analyzing how to initialize vim, I'll give you a brief description of mparm_T.

 The mparm_T is used for sharing several parameters with the main function and other functions for initializing. This struct reduces complexity of passing parameters. But it is just wrapper, not organized well, so comprehending it without prior knowledge is little hard.
 I'll explain the parameters in mparm_T one by one.

1. argc, argv

 These are copy of argc and argv of main function. The other parameters are initialized according to argv.

2. evim_mode

 Run with "-y" option or run by evim command, start as the easy vim. The easy vim  always runs as gui mode and there is no normal mode. I don't know what it is exactly, becuase I've never used it. If you wonder, read the man page and ":help evim".

3. use_vimrc

 This parameter is set by "-u" option. It can be NULL, "NONE", "NORC" and file name. The Vim skips both system vimrc and user vimrc when this option is not NULL.
 "NONE" will ignore all vimrc files, while "NORC" will not ignore plugin.
 If it is a specific file name, the Vim will initialize only from that file.

4. n_commands, commands, cmds_tofree

 They are a number of commands, commands string and flag to have to be freed. These commands executed after loading all vimrc files. "+", "-c" and "-S" options is used for them. And the number of commands cannot exceed MAX_ARG_CMDS(is defined as 10).
 Only when using "-S" options, cmds_tofree flag is set. The vim allocates dynmaic size memory for commands with "-S" option, since "-S" means read commands from a file.
 A exe_commands function consumes the commands.

5.n_pre_commands, pre_commands

  They are simular to n_commands and commands. But they are executed before loading any vimrc files by "--cmd" option. The number of commands cannot exceed MAX_ARG_CMDS like the n_commands.
 A exe_pre_commands function consumes the pre_commands.

6. edit_type, tagname, use_ef

 The Vim has five editing modes.
  1. FILE
  2. STDIN(with "-" option)
  3. TAG(with "-t" option)
  4. QF(with "-q" option)
  5. etc.
 Editing mode have to be one of above.
 FILE mode edits the given file.
 STDIN mode reads string from stdin.
 TAG mode jumps to tag.
 QF(quickfix) mode jumps to first error, if error file exists.

 The tagname parameter is used only in TAG mode and have to be NULL in other modes.
 The use_ef parameter is used only in QF mode and have to be NULL in other modes.

7. want_full_screen

 It will be always full screen in terminal, except recovery mode. The gvim can use non-full screen in the code, but gvim is not my interests.

8. stdout_isatty, term

 Check whether stdout is a terminal(using isatty function in *nix system) If stdout is not a terminal, logging error messages.

9. ask_for_key

 This is a flag that indicates whether to encrypt file or not. When starting vim with "-x" option, this flag is set. The encrypted files can be opened with same key.

10. no_swap_file

 This is a flag that indicates whether to open with swap files. When starting vim with "-n" option, this flag is set.
 Since swap files are not created, it is fast, but cannot recover from crash.
 This option don't delete already created swap files, so it can makes conflict between opend with no_swap_file and without no_swap_file.

11. use_debug_break_level

 This is debug-mode flag, starting vim with "-D" option. The initialization will break before the first vimrc command is executed.

12. window_count, window_layout

 The window_count is the number of window(or tab) to open. And the window_layout is how to split winodws(or using tab).
 There are four vim option related with window_layout
 "-p" is for using tabs to open multiple files. "-o" and "-O" is for opening many split windows("-o" is to split horizontally, "-O" is to split vertically). The last one is vimdiff and I'll explain later.
 You cannot open files both split windows horizontally and vertically. Options except last one will be omitted. For example,
vim -o3 -O2
 will open two windows vertically split .

13. serverArg, serverName_arg, serverStr, serverStrEnc, servername

 These parameters are for the clientserver feature. This feature makes you can control your already open vim with command line.
 The vim without gui disables "--servername" by default. So if you want to use it, you have to compile source code with clientserver or use gvim.
 If you want to know about this feature, see ":help clientserver"

14. literal, full_path

 Sorry, these are not used in *nix.

15. diff_mode

  The  diff_mode is flag indicates using diff mode or not. Run with "-d" option or run by vimdiff command, trun on diff mode.

You show the parameters for initializing vim. Next time I'll show you what function determine this values and how to use it, before calling the main loop.


Majestouch 스위치 교체

개발용 블로그와 그 외의 일상생활들에 대해 적는 블로그를 나누기 시작했다.

본래 있던 글은 http://diary.seulgi.kim/2013/04/majestouch.html로 이동되었다.


Poker X 스위치 교체

개발용 블로그와 그 외의 일상생활들에 대해 적는 블로그를 나누기 시작했다.

본래 있던 글은 http://diary.seulgi.kim/2013/04/poker-x.html로 이동되었다.