Skip to content

Instantly share code, notes, and snippets.

@yaoqiangpersonal
yaoqiangpersonal / .ideavimrc
Last active September 22, 2024 03:57
.ideavimrc
" 主要leader
let mapleader=' '
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
@yaoqiangpersonal
yaoqiangpersonal / init.vim
Last active December 11, 2022 12:03
neovim config #neovim #vim
let mapleader = "\<space>"
set clipboard=unnamedplus
" Packer插件管理
lua require('plugins')
if exists('g:vscode')
nnoremap <Leader>fc <Cmd>call VSCodeNotify('editor.action.formatDocument')<CR>
nnoremap <Leader>gs <Cmd>call VSCodeNotify('editor.action.triggerSuggest')<CR>
nnoremap <Leader>pd <Cmd>call VSCodeNotify('editor.action.peekDefinition')<CR>
@yaoqiangpersonal
yaoqiangpersonal / .vrapperrc
Last active December 26, 2021 08:24
.vrapperrc
set clipboard=unnamedplus
" --------------------------------- git --------------------------------------
"version control
eclipseaction eclipsecomparehead org.eclipse.egit.ui.team.CompareWithHead
nnoremap Ud :eclipsecomparehead<cr>
" --------------------------------- navigate --------------------------------------
@yaoqiangpersonal
yaoqiangpersonal / .wslconfig
Created December 27, 2021 07:51
wsl2配置 #wsl2
[wsl2]
kernelCommandLine = vsyscall=emulate
localhostorwarding=true
@yaoqiangpersonal
yaoqiangpersonal / microk8s_in_lxc.md
Created March 22, 2023 13:54 — forked from acj/microk8s_in_lxc.md
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines
  • lxc.apparmor.profile: unconfined
@yaoqiangpersonal
yaoqiangpersonal / nftables_tproxy_example.nft
Created February 4, 2024 13:42 — forked from NiceRath/nftables_tproxy_example.nft
NFTables TPROXY - proxy input and output
#!/usr/sbin/nft -f
# see also:
# https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks
# https://docs.kernel.org/networking/tproxy.html
# https://powerdns.org/tproxydoc/tproxy.md.html
# http://git.netfilter.org/nftables/commit/?id=2be1d52644cf77bb2634fb504a265da480c5e901
# http://wiki.squid-cache.org/Features/Tproxy4
# https://serverfault.com/questions/1052717/how-to-translate-ip-route-add-local-0-0-0-0-0-dev-lo-table-100-to-systemd-netw
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/net/netfilter/nft_tproxy.c