admin 发布的文章

搞了个行车记录仪。
双击批处理,自动把今天录得,拷贝到指定目录。省得我自己每天去翻目录,备份了。

@echo off
setlocal enabledelayedexpansion

set "targetDirectory=E:\DCIM\100MEDIA"
set "baseDestinationDirectory=D:\SARGO\2023"

REM 获取今天的日期
for /f "usebackq tokens=1 delims=" %%a in (`wmic os get localdatetime ^| findstr /r [0-9]`) do (
    set "datetime=%%a"
)

set "today=!datetime:~0,8!"
set "destinationDirectory=%baseDestinationDirectory%\%today%"

REM 创建以今天日期命名的目标目录
if not exist "%destinationDirectory%" (
    mkdir "%destinationDirectory%"
)

REM 遍历目标目录中的文件
for %%F in ("%targetDirectory%\*.*") do (
    REM 获取文件的修改时间
    echo "%%F"
    for /f "usebackq tokens=1-3 delims=/ " %%i in (`dir /t:w "%%F" ^| findstr "^[0-9]"`) do (
        set "fileDate=%%i%%j%%k"
    )

    REM 判断文件是否是今天创建的
    if "!fileDate!"=="!today!" (
        echo Moving %%~nxF to the destination directory.
        move "%%F" "%destinationDirectory%\"
        echo "move" "%%F" "%destinationDirectory%\"
    )
)

echo All today's files have been moved to the destination directory (%today%).

常规途径是通过
https://www.zui.com/iunlock
输入IMEI,SN号获取。
但是最近,这个网站总是提示今天获取次数太多了。

于是网上搜,找到下面的办法:
先获取SN,
adb reboot bootloader
查看SN,取后8位。

如果是联想手机系列(含拯救者):
http://cdn.zui.lenovomm.com/developer/lenovoboot/【your SN】/sn.img
如果是联想平板系列(含小新):
http://cdn.zui.lenovomm.com/developer/tabletboot/【your SN】/sn.img

然后:
adb reboot bootloader
fastboot flash unlock sn.img
fastboot oem unlock-go

https://ghp.quickso.cn/
如果主站https://ghp.quickso.cn/不能使用,请替换为镜像站https://github.hgnet.workers.dev/

git clone
git clone https://ghp.quickso.cn/https://github.com/xxx/xxx

wget & curl
wget https://ghp.quickso.cn/https://github.com/xxx/xxx/archive/master.zip
wget https://ghp.quickso.cn/https://raw.githubusercontent.com/xxx/xxx/master/xxx
curl -O https://ghp.quickso.cn/https://github.com/xxx/xxx/archive/master.zip
curl -O https://ghp.quickso.cn/https://raw.githubusercontent.com/xxx/xxx/master/xxx

头一次遇到服务端,根据客户端header里面的Accept更改返回内容格式的。
一开始用了个通用的:

'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'

结果给我返回的居然是XML格式的。
后来取消了。就返回json格式的了。。