python3

python -m http.server 8080
启动http服务(prot:8080)

python-is-python3
使用python代替python3(创建python3的软连接)

Read more

wsl2-disk

Terminal:

1
2
3
wsl -v -l
wsl --shutdown
Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName
Read more

wsl2-adb-bridge

Windows:

1
2
adb kill-server
adb -a -P 5037 nodaemon server

WSL2:

1
2
3
cat /etc/resolv.conf|grep nameserver|awk '{print $2}'
export ADB_SERVER_SOCKET=tcp:$windows_host:5037
export ADB_SERVER_SOCKET=tcp:192.168.31.38:5037
Read more

gcc

1
2
3
gcc -g -o -O2 main main.c -I.. -L.. -l
gcc -g -o main main.c -Iinclude -Llib -lavutil
gcc -g -o main ./src/main.c "pkg-config --libs libavformat libavutil"
Read more

ffmpeg4.1 compile on wsl2

Compile FFmpeg for Ubuntu, Debian, or Mint
doxygen/4.1

1
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-gnutls \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
Read more

hexo config

hexo

hexo安装

1
npm install hexo-cli -g

初始化博客

1
hexo init blog
1
npm install

博客构建

1
hexo g

初始化博客

1
hexo s

发布博客

1
hexo d
Read more