kelu | 血衫非弧の一存

Use git archive to export the last committed Git change file

Original link: https://blog.kelu.org/tech/2023/05/27/how-to-export-gits-changed-files.html git archive -o “$(basename “$(pwd)”).zip” HEAD $(git diff –name-only HEAD^ HEAD) The meaning is as follows: git archive : used to create a Git archive file. -o “$(basename “$(pwd)”).zip” : Specifies the name of the output file. Here, we use basename “$(pwd)” to get the directory name of the current directory. HEAD […]

Use git archive to export the last committed Git change file Read More »

npm ERR integrity checksum failed when using sha wanted xxxx but got yyyy

Original link: https://blog.kelu.org/tech/2023/05/23/nodejs-npm-checksum.html A front-end assembly line that hasn’t been touched for a long time, I found that I couldn’t make it up. It can’t be edited locally. I asked the manufacturer, but the manufacturer was at a loss and did not give any good advice: npm ERR! Verification failed while extracting @babel/[email protected]. For this

npm ERR integrity checksum failed when using sha wanted xxxx but got yyyy Read More »

A front-end assembly line that hasn’t been touched for a long time, I found that I couldn’t make it up. It can’t be edited locally. I asked the manufacturer, but the manufacturer was at a loss and did not give any good advice: npm ERR! Verification failed while extracting @babel/[email protected]. For this reason, I even specially installed the same version of node and npm as the manufacturer, but it still doesn’t work, which is annoying. In the spirit of asking gpt first in case of indecision, the solutions he gave were useless. I tried to run it, but as the front end of a half-bucket of water, it is really big, and it is useless. It seems that we still have to rely on Google to read it slowly. I know more about php-related projects, and composer also uses lock files as a snapshot slice for version management. In fact, it is a good way to delete the lock file and install again, and it will definitely succeed. After success, I compared the lock file, and there are many changes with the previous one. As a newcomer, I really don’t have the courage to delete the lock file of this front-end file and install it again, for fear that other errors will make it more difficult to find the problem. So I used a conservative method to directly change the content in the lock file, first search for the value of the first sha1, and then replace it with the value of the second sha1: I can finally compose it~~ References npm reported an error, the build failed

Original link: https://blog.kelu.org/2023/05/25/2023-05-23-nodejs-npm-checksum.html blood shirt non-arc の deposit A front-end assembly line that hasn’t been touched for a long time, I found that I couldn’t make it up. It can’t be edited locally. I asked the manufacturer, but the manufacturer was at a loss and did not give any good advice: npm ERR! Verification failed

A front-end assembly line that hasn’t been touched for a long time, I found that I couldn’t make it up. It can’t be edited locally. I asked the manufacturer, but the manufacturer was at a loss and did not give any good advice: npm ERR! Verification failed while extracting @babel/[email protected]. For this reason, I even specially installed the same version of node and npm as the manufacturer, but it still doesn’t work, which is annoying. In the spirit of asking gpt first in case of indecision, the solutions he gave were useless. I tried to run it, but as the front end of a half-bucket of water, it is really big, and it is useless. It seems that we still have to rely on Google to read it slowly. I know more about php-related projects, and composer also uses lock files as a snapshot slice for version management. In fact, it is a good way to delete the lock file and install again, and it will definitely succeed. After success, I compared the lock file, and there are many changes with the previous one. As a newcomer, I really don’t have the courage to delete the lock file of this front-end file and install it again, for fear that other errors will make it more difficult to find the problem. So I used a conservative method to directly change the content in the lock file, first search for the value of the first sha1, and then replace it with the value of the second sha1: I can finally compose it~~ References npm reported an error, the build failed Read More »

Chrome allows cross-domain

Original link: https://blog.kelu.org/tech/2023/05/22/chrome-cors-issue.html This problem is most likely to be encountered in the development environment chrome: blocked by CORS policy The easiest solution is to switch to Firefox. If you must use Chrome, you can use the following methods to turn off CORS detection: Windows Copy a shortcut of the chrome browser, find the opening

Chrome allows cross-domain Read More »

Mac homebrew notes

Original link:https://blog.kelu.org/tech/2023/05/21/mac-brew-remark.html This article will be kept updated. Because it is not a one-time tool. After encountering a homebrew problem, I recorded it here. view configuration brew config Update brew information brew update Encountered an error: `fetching failed`. . . The reason is that the clash port running on my computer has a problem with

Mac homebrew notes Read More »

Install Windows on x86 in M1 Mac

Original link: https://blog.kelu.org/tech/2023/05/12/install-x86-windows-in-mac-m1.html Running the x86 version of Windows 7 today on my M1 MacBook Air. Make a simple note here. installation steps Download and install UTM First, visit the official UTM website to download the UTM application . Follow the prompts to install on your Mac. Prepare a Windows x86 ISO file It should

Install Windows on x86 in M1 Mac Read More »

Available sources for Debian 9 Stretch available as of May 2023 sources.list

Original link: https://blog.kelu.org/tech/2023/05/14/debian-9-Stretch-available-source-list.html Announced March 27, 2023 Archive : deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian/ stretch-proposed-updates main contrib non-free deb http://archive.debian.org/debian-security stretch/updates main contrib non-free This article is transferred from: https://blog.kelu.org/tech/2023/05/14/debian-9-Stretch-available-source-list.html This site is only for collection, and the copyright belongs to the original author.

Available sources for Debian 9 Stretch available as of May 2023 sources.list Read More »

Query the MD5 value of a file on Mac and win

Original link:https://blog.kelu.org/tech/2023/05/07/md5-win-and-mac.html Windows Use the native command CertUtil in CMD to verify the md5 value: CertUtil -hashfile 文件路径MD5 For example: CertUtil -hashfile C: \U sers \u sername \D ownloads \m yfile.txt MD5 Mac md5 文件路径 For example: md5 “/Users/username/Downloads/My Folder/myfile.txt” This article is transferred from:https://blog.kelu.org/tech/2023/05/07/md5-win-and-mac.html This site is only for collection, and the copyright belongs

Query the MD5 value of a file on Mac and win Read More »

Run wireshark as root on Mac

Original link: https://blog.kelu.org/tech/2023/05/06/running-wireshark-in-mac-with-root-user.html This answer is generated by gpt: sudo /Applications/Wireshark.app/Contents/MacOS/Wireshark This article is transferred from: https://blog.kelu.org/tech/2023/05/06/running-wireshark-in-mac-with-root-user.html This site is only for collection, and the copyright belongs to the original author.

Run wireshark as root on Mac Read More »

git rollback/undo operations

Original link: https://blog.kelu.org/tech/2023/05/05/git-rollback-operation.html git has three rollback scenarios: Workspace rollback (without git add ) Temporary storage area rollback ( git add but not git commit ) Repository rollback ( git commit ) Make a record here. 1. Workspace rollback The workspace is the content that has not been git add , the currently visible directories

git rollback/undo operations Read More »

Set Bing wallpaper for macOS random timer

Original link: https://blog.kelu.org/tech/2023/05/04/change-background-with-bing-wallpaper-in-macos-by-script.html This is a project on github, very simple and practical, use the command line to download bing’s wallpaper and replace it with Mac’s wallpaper. Although it is not elegant, it is better than simplicity, record it. Source: https://github.com/xiqishow/bing_wallpaper #!/usr/bin/env bash #创建壁纸目录echo $ if [[ $1 = “-n” ]] then osascript -e “display

Set Bing wallpaper for macOS random timer Read More »

ChatGPT rule configuration for Clash agent

Original link: https://blog.kelu.org/tech/2023/05/03/proxy-chatgpt-rules-with-clash.html rules : – DOMAIN-SUFFIX,openai.com,GPT – DOMAIN-SUFFIX,auth0.com,GPT – DOMAIN-SUFFIX,bing.com,GPT – DOMAIN-SUFFIX,live.com,GPT This article is transferred from: https://blog.kelu.org/tech/2023/05/03/proxy-chatgpt-rules-with-clash.html This site is only for collection, and the copyright belongs to the original author.

ChatGPT rule configuration for Clash agent Read More »