Skip to content

Instantly share code, notes, and snippets.

View leonlee's full-sized avatar
🎯
Focusing

Leon Lee leonlee

🎯
Focusing
  • ACAR
  • Beijing
View GitHub Profile
" Settings
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
let mapleader=";"
noremap j 3j
noremap k 3k
noremap J <C-d>
noremap K <C-u>
map <Leader>s :stop<cr>
noremap h gT
noremap l gt
map < <C-6>
let mapleader=";"
noremap j 3j
noremap k 3k
noremap J <C-d>
noremap K <C-u>
map <Leader>s :stop<cr>
noremap h gT
noremap l gt
map < <C-6>
public abstract class BaseDAO {
private static final Logger L = LoggerFactory.getLogger(BaseDAO.class);
@Autowired
protected JdbcTemplate template;
@PostConstruct
public void afterInit() {
L.info("base dao");
if (template == null) {
"vundle pre-config
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"vundle bundles & plugins
Plugin 'VundleVim/Vundle.vim'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-git'
"vundle pre-config
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"vundle bundles & plugins
Plugin 'VundleVim/Vundle.vim'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-git'
"vundle pre-config
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"vundle bundles & plugins
Plugin 'VundleVim/Vundle.vim'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-git'
@leonlee
leonlee / iptableflip.sh
Created March 31, 2016 11:06 — forked from lewisd32/iptableflip.sh
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
let mapleader=";"
noremap j 3j
noremap k 3k
noremap J <C-d>
noremap K <C-u>
map <Leader>s :stop<cr>
noremap h gT
noremap l gt
map < <C-6>
@leonlee
leonlee / vim.markdown
Created March 7, 2016 11:57 — forked from socketwiz/vim.markdown
Vim cheat sheet

##motions

motion description
h Count characters left
l Count characters right
^ To the first character of the line
$ To the last character of the line
f<char> To the counth character occurrence to the right. F<char> to the counth character occurrence to the left
t<char> To 1 character just before the counth character occurrence to the right
T<char> To 1 character just before the counth character occurrence to the left