Skip to content

Instantly share code, notes, and snippets.

mp.add_forced_key_binding(";", "speed-control", function(kevent)
if kevent["event"] == "down" then
mp.command("set speed 2")
elseif kevent["event"] == "up" then
mp.command("set speed 1")
end
end, {
repeatable = false,
complex = true
})
@washingweb
washingweb / init.vim
Created November 26, 2022 01:43 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@washingweb
washingweb / foo.md
Last active April 12, 2022 01:20
new gist using gistpad

this is a gist.

add some change.

# share history
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" # Save and reload the history after each command finishes
# aliases
alias ww-edit='vim ~/.rc/.bashrc.user'
@washingweb
washingweb / prettyconf.md
Created January 4, 2021 03:09
python conf
import os
from prettyconf import config
from prettyconf.loaders import RecursiveSearch, Environment


config.loaders = [Environment(), RecursiveSearch(starting_path=os.getcwd())]

CONF_A = config('CONF_A')
CONF_B = config('CONF_B', cast=int)
@washingweb
washingweb / README.md
Created December 31, 2020 08:38
Vim 换行

Display CRLF as ^M:

:e ++ff=unix

Substitute CRLF for LF:

:setlocal ff=unix :w :e

@washingweb
washingweb / README.md
Last active December 27, 2020 08:52
Debezium experiment

Reference

docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper:1.3
docker run -it --rm --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium/kafka:1.3
@washingweb
washingweb / config
Last active June 24, 2021 07:32
ssh config vscode
Host test4g
HostName ip.ip.ip.ip
Port 22
User root
ForwardAgent yes
IdentityFile ~/.ssh/id_rsa_xxx
@washingweb
washingweb / .vimrc
Last active October 28, 2022 13:27
vim
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
" show line number
set nu
" enable mouse