Skip to content

Instantly share code, notes, and snippets.

@wenlilearn
wenlilearn / wsl2-network.ps1
Last active August 5, 2021 18:31 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
$remoteport = wsl hostname -I
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
# Send prefix
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
@wenlilearn
wenlilearn / .vimrc
Last active September 18, 2018 00:36
vim setting
" Remember to install apt-vim
" Then install nerdtree and airline
" Text and indentation
set number
set autoindent
set smarttab
set expandtab
set shiftwidth=2
set tabstop=2