Tips - acehippo/slowmotion GitHub Wiki

ssh

ssh -p 443 -R 7777:localhost:22 id@host
  • keepalive
client - /etc/ssh/ssh_config

Host *
ServerAliveInterval 100
server - /etc/ssh/sshd_config

ClientAliveInterval 60
TCPKeepAlive yes
ClientAliveCountMax 10000

vimrc

  • :vundle install
  • vundle
$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  • pathogen
$ mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
  • nerdtree, tagbar
execute pathogen#infect()
set nocompatible
set number
syntax enable
filetype off
let g:go_disable_autoinstall = 0
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

set rtp+=~/.vim/bundle/Vundle.vim
"colorscheme molokai
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'nsf/gocode', {'rtp': 'vim/'}
Plugin 'fatih/vim-go'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree.git'
Plugin 'majutsushi/tagbar'
Plugin 'editorconfig/editorconfig-vim'
call vundle#end()
filetype plugin indent on
"Prevent autocomplete help from staying visisble
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
"Quit VIM if NERDTree is last open Window
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
"Autoload NERDTree on VIM start
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
"Beginning and end of line shortcuts
map <c-a> <home>
map <c-e> <end>
nmap <F8> :TagbarToggle<CR>
nmap <F7> :NERDTreeToggle<CR>
  • plugin install
:PluginInstall
  • go binary install
:GoInstallBinaries

references

vim

  • resize
ex)
:resize 60
:vertical resize +5
vertical resize : ctrl+<, ctrl+>

sql

  • query example
select from_unixtim(uid/1000,'%D%h') time, utterance from utterances where utterance like '%메르스%' order by time asc;
select from_unixtime(uid/1000, '%D%H') as hour, count(from_unixtime(uid/1000,'%H')) as count, agent from utterances where utterance like '갤럭시%' group by hour into outfile '/tmp/agent_count_galaxy.csv' fields terminated by ',' lines terminated by "\n";
⚠️ **GitHub.com Fallback** ⚠️