Download the usb drivers, extract them and install “android_winusb.inf” by right clicking on it then click install. Install them even if your device is detected in fastboot mode because further in the guide the phone will go in fastbootD mode and your computer might not detect the phone in that mode.
一些银行应用会检测 Play Integrity(设备完整性,等级包适 BASIC、DEVICE、STRONG),手机解锁引导程序后 Play Integrity 等级下降,导致银行应用拒绝运行或者隐藏部分功能(比如指纹支付)。可以使用 Play Integrity Fix 和 TrickyStore 来修复 Play Integrity。
functionloadScript({url,delay,onloadCallback,async,preloadCallback,attributes={},}){functionload(){if(preloadCallback)preloadCallback();constscript=document.createElement("script");script.src=url;script.async=async;// Set attributes
Object.entries(attributes).forEach(([key,value])=>{script.setAttribute(key,value);});if(onloadCallback)script.onload=onloadCallback;document.body.appendChild(script);}if(typeofdelay!=="undefined"){setTimeout(load,delay);}else{load();}}
我给 Google Analytics、Giscus、Disqus 加了 100ms 等待时间,给 swup 添加了 200ms 等待时间。
一开始我用 Hugo 做中文网站时打算在文章里用中文标签,但是链接里面的中文会被转换为人类读不懂的字符。比如:/zh-cn/tags/博客/ 会变成 /zh-cn/tags/%E5%8D%9A%E5%AE%A2/。我不喜欢这样,当时搜索一番也没找到办法,就用英文标签了。现在终于知道怎么改了,最终改为链接里面还是用英文,但是页面就显示中文。
下面是针对 hugo-theme-jane(ef8a126)主题的更改方法,方法是通用的,但是不同主题修改的部分可能不同。开始前先厘清两个概念:标签名(tag name)、标签标题(tag title)。在文章前页(front matter)写的是标签名,用于链接;在 _index.md 文件定义的是 title 是标签标题,它会显示于页面。
#!/usr/bin/env python importosimportsysdefcreate_tag_title(directory,tag_name,tag_title):# Construct the path to the tag directorytag_dir=os.path.join(directory,'tags',tag_name)# Make the directories if they don't existos.makedirs(tag_dir,exist_ok=True)# Define the path for the _index.md fileindex_file_path=os.path.join(tag_dir,'_index.md')# Define the content of the _index.md fileindex_content=f"""---
title: {tag_title}---
"""# Write the content to the _index.md filewithopen(index_file_path,'w')asindex_file:index_file.write(index_content)print(f"Created {index_file_path} with title: {tag_title}")if__name__=='__main__':# Ensure the correct number of arguments are providediflen(sys.argv)!=4:print("Usage: create-tag-title directory tag-name tag-title")sys.exit(1)# Read the arguments from the command linedirectory=sys.argv[1]tag_name=sys.argv[2]tag_title=sys.argv[3]# Call the function to create the tag title filecreate_tag_title(directory,tag_name,tag_title)
自己写提交信息还是太繁琐,让 ChatGPT 把这部分也加上。
我说的话:
Besides creating the _index.md, I want to stage content/ directory and commit. Example:
#!/usr/bin/env pythonimportosimportsysimportsubprocessdefcreate_tag_title(directory,tag_name,tag_title):# Construct the path to the tag directorytag_dir=os.path.join(directory,'tags',tag_name)# Make the directories if they don't existos.makedirs(tag_dir,exist_ok=True)# Define the path for the _index.md fileindex_file_path=os.path.join(tag_dir,'_index.md')# Define the content of the _index.md fileindex_content=f"""---
title: {tag_title}---
"""# Write the content to the _index.md filewithopen(index_file_path,'w')asindex_file:index_file.write(index_content)print(f"Created {index_file_path} with title: {tag_title}")# Stage the content directorytry:subprocess.run(['git','add',directory],check=True)print(f"Staged {directory}")# Commit the changescommit_message=f'tag-title: {tag_name} -> {tag_title}'subprocess.run(['git','commit','-m',commit_message],check=True)print(f"Committed with message: '{commit_message}'")exceptsubprocess.CalledProcessErrorase:print(f"Error during git operation: {e}")if__name__=='__main__':# Ensure the correct number of arguments are providediflen(sys.argv)!=4:print("Usage: create-tag-title directory tag-name tag-title")sys.exit(1)# Read the arguments from the command linedirectory=sys.argv[1]tag_name=sys.argv[2]tag_title=sys.argv[3]# Call the function to create the tag title filecreate_tag_title(directory,tag_name,tag_title)
Configuring a Build | Vercel Docs: When you make a deployment, Vercel builds your project. During this time, Vercel performs a “shallow clone” on your Git repository using the command git clone --depth=10 (...) and fetches ten levels of git commit history. This means that only the latest ten commits are pulled and not the entire repository history. ↩︎