Skip to content

Instantly share code, notes, and snippets.

View wtfc0d3's full-sized avatar
🤡

wtfc0d3

🤡
View GitHub Profile
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source ~/.vimrc
\| endif
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree'
@wtfc0d3
wtfc0d3 / wsl.md
Last active June 16, 2021 10:54
Все про WSL

Остановка запущенного образа

Если просто закрыть вкладку, то WSL дистрибутив останется запущенным.

# Список запущенных дистрибутивов
PS C:\Users\Sergey> wsl.exe --list --running
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
c/Users/Sergey
❯ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync oflag=direct
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.13859 s, 259 MB/s

c/Users/Sergey
❯ rm test
@wtfc0d3
wtfc0d3 / gist:9a072e5cf6172f947b5b376e4dcf4ff3
Created June 15, 2021 18:04
Запись вывода консоли в файл
Start-Transcript -Path "$HOME\Documents\out.txt" -NoClobber
# Some commands
Stop-Transcript
-join ((48..57) + (65..90) + (97..122) | Get-Random -Count 8 | % {[char]$_})