01|修改Win用户名
打开运行,输入cmd,回车;
输入control userpasswords2,回车;
点击属性,修改用户名,点击确定;
打开运行,输入regedit,回车;
定位到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList;
选中下面名字最长的项,双击右侧的ProfileImagePath,修改 C:\Users\ 后的用户名,点击确定;
注销并重新登录;
打开 C:\User\,将新的用户名文件夹删除,再将原来的的用户名文件夹重命名为新的用户名;
再次注销并重新登录。
02|修的内核bug如何推进
发patch
-
克隆最新代码,确定问题还存在
-
新建本地分支,修改要修改的部分
git add 修改的文件 git commit -s commit-log 《标题》:修改的大类:简短的patch主要描述 《空行》 《详细描述》 git format-patch -1(可以在三小短线下写点东西)
-
使用get-maintainer获取当前文件的维护者,发给子系统(可以使用git自带的send-mail命令)
03|cl(VS ToolChain)编译ffmpeg
lame: ./configure --enable-shared --prefix=/mnt/Mp3/Out/ --host=x86_64-pc-windows CC=cl.exe
ffmpeg: ./configure --prefix=Out --toolchain=msvc --enable-w32threads --enable-x86asm --disable-doc --disable-ffprobe --enable-small --disable-runtime-cpudetect --disable-network --disable-debug
x264: ./configure --enable-static --enable-shared
lame: ./configure --prefix=/usr/local --enable-static --enable-shared
ffmpeg: ./configure --prefix=Out --enable-x86asm --enable-network --enable-protocol=https --enable-optimizations --enable-gpl --enable-libx264 --enable-libmp3lame --enable-small --enable-static --disable-shared --disable-ffprobe --disable-doc --extra-cflags=/usr/local/include --extra-ldflags=/usr/local/lib
04|WSA on Win10
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
https://github.com/cinit/WSAPatch/
05|Docker Commands on Win
www.docker.com
learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig
learn.microsoft.com/zh-cn/windows/wsl/wsl-config#configuration-setting-for-wslconfig
mklink /j "C:\Program Files\Docker" "K:\Vmachine\Docker"
wsl --export dis_name dest
wsl --unregister dis_name
wsl --import dis_dest dis_export --version 2
06|CheatEngine PVZ 0cd
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
add dword ptr [edi+24],10000
mov eax,[edi+24]
exit:
jmp returnhere
"PVZ原版启动程序.exe"+8728C:
jmp newmem
nop 2
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"PVZ原版启动程序.exe"+8728C:
add dword ptr [edi+24],01
mov eax,[edi+24]
//Alt: db 83 47 24 01 8B 47 24
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="38">
<CheatEntries>
<CheatEntry>
<ID>0</ID>
<Description>"No description"</Description>
<LastState Value="0" RealAddress="1566453C"/>
<VariableType>4 Bytes</VariableType>
<Address>1566453C</Address>
</CheatEntry>
<CheatEntry>
<ID>1</ID>
<Description>"0cd script"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '