[{"content":"Recently, the topic of AI agents has been very hot. I\u0026rsquo;ve been learning about it too and made a summary of several agents I\u0026rsquo;ve used.\nModels # The most popular models across the internet are still those from Anthropic, Google, and OpenAI. However, since their servers are overseas, it\u0026rsquo;s a bit troublesome to use them in China. Additionally, overseas models are quite expensive. So I\u0026rsquo;ve been using the GLM Coding Plan, which is much more affordable.\nClaude Code # First, let me introduce the currently most popular Claude Code, hereinafter referred to as CC. Although CC is a tool specifically designed for Claude models, it can also be configured to use third-party models, and the effect is pretty good.\nInstallation # irm https://claude.ai/install.ps1 | iex After installation, you can open CC with the claude command. If you have a Claude Pro account, you can start using Claude now. Of course, here I want to use third-party models, so additional configuration is needed.\nConfiguration # The simplest way to configure is to use Zhipu Qingyan\u0026rsquo;s automated configuration assistant. Run the following command and follow the prompts.\nnpx @z_ai/coding-helper Alternatively, if you want to configure manually, edit the $HOME/.claude/settings.json configuration file, copy the following configuration, and fill in your own API KEY. If this file doesn\u0026rsquo;t exist, you need to create it manually.\n{ \u0026#34;env\u0026#34;: { \u0026#34;ANTHROPIC_AUTH_TOKEN\u0026#34;: \u0026#34;your-api-key\u0026#34;, \u0026#34;ANTHROPIC_BASE_URL\u0026#34;: \u0026#34;https://open.bigmodel.cn/api/anthropic\u0026#34;, \u0026#34;API_TIMEOUT_MS\u0026#34;: \u0026#34;3000000\u0026#34;, \u0026#34;CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC\u0026#34;: \u0026#34;1\u0026#34; } } After successful configuration, switch to your project in the command line, open CC, and there should be no login prompt, which means the configuration is successful. It\u0026rsquo;s worth noting that after enabling Zhipu Qingyan\u0026rsquo;s model, although the model displayed in the CC interface is still the claude model, it has actually been replaced with the GLM model. This point needs attention.\nConfiguring Skills # Recently, Claude also launched a powerful feature - Agent Skills. Essentially, it\u0026rsquo;s still a prompt, telling the large model what to do now. But this is where it\u0026rsquo;s interesting. Previously, to make large models implement complex functions, we needed to configure agents one by one, then design flowcharts to connect them. This was not only troublesome but also not universal, and it …","date":"2026-01-14","externalUrl":null,"objectID":"/tutorials/some-ai-agents-guide/","permalink":"/tutorials/some-ai-agents-guide/","section":"Tutorials","summary":"","title":"A Tutorial on Using Some AI Agents","type":"tutorials"},{"content":"I\u0026rsquo;ve tried many browsers over the years, but I keep coming back to Firefox. The deciding features for me were simple: opening bookmarks in a new tab and showing search results in a new tab. I was surprised that mainstream browsers like Chrome and Edge don\u0026rsquo;t provide these small conveniences, so Firefox became the obvious choice. This article documents some of the Firefox settings and tweaks I use.\nFeature Customization # Enable Vertical Tabs # Right-click on an empty area of the Firefox toolbar and choose \u0026ldquo;Customize Toolbar\u0026rdquo; — this lets you heavily customize the browser\u0026rsquo;s UI to your taste. Arrange the toolbar and other UI elements however you prefer.\nI also recommend right-clicking the tab bar and selecting \u0026ldquo;Enable vertical tabs\u0026rdquo; (or using an extension that provides vertical tabs). Modern monitors are wide, and many websites are not well-optimized for wide layouts, leaving large blank margins on both sides. Switching to vertical tabs makes better use of the horizontal space and frees up some vertical space. If you tend to keep many tabs open at once, vertical tabs also make it easier to find the tab you want.\nOpen Bookmarks and Search Results in New Tabs # This is one of the features I find most useful. Surprisingly, most mainstream browsers don\u0026rsquo;t provide it, but Firefox (and some Chromium forks) can. With these settings enabled, you don\u0026rsquo;t have to create a blank tab first and then open a bookmark or start a search — the result opens directly in a new tab.\nTo enable these options, open about:config in Firefox and search for the following preferences. Set each one to true (or the recommended value) to enable the behavior:\nbrowser.search.openintab browser.tabs.loadBookmarksInTabs browser.urlbar.openintab Browser Appearance # Firefox-WinUI Theme # The default Firefox look is fine, but you can customize appearance using user themes and extensions. I use the Firefox-WinUI user theme (https://github.com/Lockframe/Firefox-WinUI) to integrate Firefox with Windows 11 and enable acrylic (translucent) effects — the result looks great.\nCopy Profile Files # Open about:support in Firefox and locate the Profile Folder. Click the \u0026ldquo;Open Folder\u0026rdquo; button next to it to open the profile directory in your file explorer.\nDownload the theme package from the Firefox-WinUI repository, extract it, and copy the chrome folder and the user.js file into your Firefox profile folder.\nTheme Settings # Finally, open about:config …","date":"2025-11-19","externalUrl":null,"objectID":"/tutorials/firefox/","permalink":"/tutorials/firefox/","section":"Tutorials","summary":"","title":"Firefox Browser Guide","type":"tutorials"},{"content":"One of the most criticized aspects of Windows 11 is its context menu, which splits the original menu functions into a secondary menu, making operations more cumbersome. As a result, many people choose to revert the context menu to the traditional style. However, some users prefer the Windows 11 context menu. So, is it possible to add items directly to the Windows 11 context menu? Of course! Today, I want to introduce ContextMenuForWindows11, a tool that allows you to customize the Windows 11 context menu and set it up just the way you like.\n📥 Installation # First, you need to download the software. The easiest way is to install it directly from the Microsoft Store, but the store version is paid. If you don\u0026rsquo;t want to pay, you can install the GitHub version. Before installing, you need to install the certificate: open the certificate file, import ➡️ Local Machine ➡️ Place all certificates in the following store ➡️ Trusted People, then click Finish.\nNext, install the appx package. If you are prompted that dependencies are missing, just install the required dependencies.\n🖱️ Usage # The software is very easy to use. Click the plus sign on the left, then enter the menu item\u0026rsquo;s title, launch path, parameters, icon, etc., and finally click Save at the bottom. This will successfully add a new Windows 11 context menu item, which you can use from the right-click menu in the future!\n🖼️ ","date":"2025-06-04","externalUrl":null,"objectID":"/tutorials/context-menu-for-windows11/","permalink":"/tutorials/context-menu-for-windows11/","section":"Tutorials","summary":"","title":"🛠️ ContextMenuForWindows11","type":"tutorials"},{"content":"When installing Fedora 42 Workstation on a physical machine or virtual machine, you need to enable third-party repositories during the installation process. After installation, you can follow this guide to further configure your system. If you are using a different version of Fedora, some configurations in this article may not apply.\nSystem Configuration # No Password sudo # By default, running sudo commands requires entering a password. If you don\u0026rsquo;t want to enter your password every time you use sudo, you can run the following command:\necho \u0026#34;$(whoami) ALL=(ALL) NOPASSWD: ALL\u0026#34; | sudo tee \u0026#34;/etc/sudoers.d/$(whoami)\u0026#34; System Update # The system is not up to date by default after installation. It\u0026rsquo;s best to update your system before performing other operations to keep it current.\nsudo dnf -y update After the update, it\u0026rsquo;s recommended to reboot your system.\nNVIDIA Driver # If you use an NVIDIA graphics card, install the following driver:\nsudo dnf install -y akmod-nvidia Wait a moment, then run the following command to check if the NVIDIA kernel module has been built. After that, reboot your system.\nmodinfo -F version nvidia Set Hostname # sudo hostnamectl set-hostname myfedora Optimize Boot Speed # sudo systemctl disable NetworkManager-wait-online.service sudo rm /etc/xdg/autostart/org.gnome.Software.desktop System Beautification # Install GNOME Shell Extensions # First, install the extension and tweak tools:\nsudo dnf install -y gnome-tweaks gnome-extensions-app Here are some GNOME Shell extensions you can install as needed:\nsudo dnf install -y gnome-shell-extension-pop-shell xprop sudo dnf install -y gnome-shell-extension-user-theme sudo dnf install -y gnome-shell-extension-just-perfection sudo dnf install -y gnome-shell-extension-dash-to-dock sudo dnf install -y gnome-shell-extension-blur-my-shell sudo dnf install -y gnome-shell-extension-caffeine sudo dnf install -y gnome-shell-extension-drive-menu Some GNOME Shell extensions can only be installed online:\nvitals: An extension that displays system information in the top bar After installation, you can enable and adjust the settings of each extension in the Extensions app.\nWindow Effects # The following extensions also need to be enabled in the Extensions app:\nBurn My Windows - GNOME Shell Extensions: Window open/close effects compiz-windows-effect: Window movement effects compiz-alike-magic-lamp-effect: Window maximize/minimize effects Install Icon Theme # git clone …","date":"2025-05-31","externalUrl":null,"objectID":"/posts/things-to-do-after-installing-fedora-42/","permalink":"/posts/things-to-do-after-installing-fedora-42/","section":"Posts","summary":"","title":"Things to Do After Installing Fedora 42","type":"posts"},{"content":"Today, I\u0026rsquo;ll introduce how to use asynchronous programming in Python. This article focuses on the usage of asynchronous programming, so it won\u0026rsquo;t delve too much into underlying concepts.\nBrief Introduction to Concepts # Coroutine: A special function marked with async that can execute code asynchronously. Event Loop: The core of Python asynchronous programming, responsible for scheduling coroutines. Future: A low-level object representing the eventual result of an asynchronous operation. Task: A wrapper for Future that can encapsulate coroutines and supports operations like cancellation. We all know that in operating systems, creating and switching processes and threads is very resource-intensive, making it prone to performance bottlenecks under high loads. Coroutines, on the other hand, are smaller execution units defined within the program. Since they don\u0026rsquo;t involve the overhead of process and thread context switching, coroutines are much lighter. We can easily create and run thousands of coroutines in a program—something that would be impossible with processes and threads.\nAlthough coroutines may sound magical, they are actually not much different from ordinary functions. The only difference is that Python coroutines run on an event loop, which gives them their magical concurrency capabilities. When we execute a regular function, if it takes 1 second to complete, all subsequent code must wait for the current function to finish before continuing—the entire program execution is a straight line. However, when we execute a coroutine on an event loop, if the current coroutine needs to wait for 1 second, the event loop will pause executing this coroutine and immediately look for the next executable coroutine. After 1 second, it will return to continue executing the paused coroutine. The entire program execution resembles a circular pipeline, looping back and forth—hence the name \u0026ldquo;event loop.\u0026rdquo;\nIt\u0026rsquo;s important to note that an event loop is a form of pseudo-concurrency, not true concurrent execution. If you\u0026rsquo;re performing I/O-intensive tasks, such as network connections or data read/write operations, the CPU is essentially idle, waiting for external data input. During this time, the event loop can use the CPU\u0026rsquo;s idle time to execute the next task. However, if you\u0026rsquo;re performing CPU-intensive tasks, such as file compression, the CPU is fully occupied, leaving no room for the event loop to execute the next task. …","date":"2025-05-09","externalUrl":null,"objectID":"/posts/understanding-python-async-in-ten-minutes/","permalink":"/posts/understanding-python-async-in-ten-minutes/","section":"Posts","summary":"","title":"Understanding Python Asynchronous Programming in 10 Minutes","type":"posts"},{"content":"Variance is a concept in programming that is prone to mistakes. I used to have only a vague understanding of it, so this time I specifically looked up a lot of information online to thoroughly study the issue. I also took the opportunity to write a blog post introducing it, so that if I forget in the future, I can quickly recall it.\nHere, we\u0026rsquo;ll use the classic Java as the primary language to briefly explore this issue.\nBasic # First, let\u0026rsquo;s create some class relationships for demonstration. The example is quite simple: we\u0026rsquo;ll start by creating the classes Animal, Cat, and Dog, which have an inheritance relationship. Then, we\u0026rsquo;ll define a generic class Merchant to buy and sell these types of animals.\nclass Animal { } class Dog extends Animal { } class Cat extends Animal { } class Merchant\u0026lt;T\u0026gt; { public final Deque\u0026lt;T\u0026gt; inventory; public Merchant() { this.inventory = new ArrayDeque\u0026lt;\u0026gt;(); } public Merchant(Collection\u0026lt;T\u0026gt; collection) { this.inventory = new ArrayDeque\u0026lt;\u0026gt;(collection); } public void buy(T t) { inventory.push(t); } public T sell() { return inventory.pop(); } } In this way, we can write the following code: use an animal merchant to buy and sell animals, and use a cat merchant to buy and sell cats. Everything is just so perfect.\nMerchant\u0026lt;Animal\u0026gt; animalMerchant = new Merchant\u0026lt;\u0026gt;(); animalMerchant.buy(new Animal()); Animal animal = animalMerchant.sell(); Merchant\u0026lt;Cat\u0026gt; catMerchant = new Merchant\u0026lt;\u0026gt;(); catMerchant.buy(new Cat()); Cat cat = catMerchant.sell(); Let\u0026rsquo;s think about this: if we now need to buy some animals, but there is only a cat merchant nearby, can we treat this cat merchant as an animal merchant and buy animals from him? Conversely, if we currently have some cats we want to sell to a cat merchant, but there is only an animal merchant, can we treat this animal merchant as a cat merchant and sell the cats to him? These two questions lead us to the main topic of this article: covariance and contravariance. Alright, let\u0026rsquo;s continue reading.\nCovariance and Contravariance # Covariance # First, let\u0026rsquo;s discuss the first question: Can a cat merchant sell animals like an animal merchant? Theoretically, it should be possible, because cats are clearly a type of animal, so a cat merchant can certainly sell cats as animals. However, when we translate this logic into Java code, the compiler throws an error. Why is that? Because the compiler is very strict—even though there …","date":"2023-05-07","externalUrl":null,"objectID":"/posts/understanding-variance-in-10-minutes/","permalink":"/posts/understanding-variance-in-10-minutes/","section":"Posts","summary":"","title":"Understanding Covariance and Contravariance in 10 Minutes","type":"posts"},{"content":"KeePassXC is a free and open-source password manager with a wealth of powerful features to strongly protect your passwords. If you have registered many accounts, can\u0026rsquo;t remember your passwords, and often need to reset them, you should definitely try KeePassXC. It will ensure you never have to worry about forgetting your passwords again!\nGetting Started # Download and Install # First, go to the official website to download and install KeePassXC.\nCreate a Database # Open the KeePassXC software, and you should see a similar interface. Before using it for the first time, you need to create a database. All your passwords will be securely stored in the database in an encrypted form. Even if the database is leaked, your passwords will remain protected.\nClick the \u0026ldquo;New Database\u0026rdquo; button in the interface to open the dialog. First, give your database a name — there are no strict requirements, just name it as you like.\nNext, you need to set the database format and encryption settings. The default configuration is optimal, so you don\u0026rsquo;t need to change anything here. Unless you have special requirements, the default decryption time of 1 second is sufficient. A longer decryption time uses more transformation rounds, making the database more secure, but it will also take longer to open and save.\nIf you\u0026rsquo;re interested, you can click \u0026ldquo;Advanced Settings\u0026rdquo; to modify the encryption algorithm and transformation rounds yourself. Different configurations require different amounts of time. After configuring, don\u0026rsquo;t forget to click the \u0026ldquo;Benchmark 1 Second Delay\u0026rdquo; button to calculate the number of rounds needed for a 1-second delay based on your pc specs and device performance.\nFinally, you need to set a password for the database. Every time you use KeePassXC, you must enter this password to open the database. If you forget the password, you will permanently lose access to the database, so be sure to remember it!\nIf you are sure that no one else uses your computer and you don\u0026rsquo;t want to enter a password every time you open KeePassXC, you can use a \u0026ldquo;lazy\u0026rdquo; method, but this will reduce security. This method is to use only a key file to encrypt the database. In the password setup dialog, select \u0026ldquo;Add Additional Protection,\u0026rdquo; choose \u0026ldquo;Add Key File,\u0026rdquo; then click \u0026ldquo;Generate\u0026rdquo; to create a key file with the .keyx extension. If you use only this file to encrypt the database, you won\u0026rsquo;t …","date":"2022-12-26","externalUrl":null,"objectID":"/tutorials/keepassxc/","permalink":"/tutorials/keepassxc/","section":"Tutorials","summary":"","title":"KeePassXC Password Manager","type":"tutorials"},{"content":"Friends who often install operating systems should be very familiar with making bootable drives, as it is a necessary step every time an operating system is installed. If the operating system to be installed is different from the previous one, then the bootable drive has to be made again.\nIs there any tool that can get this job done once and for all, thus bidding farewell to the complicated steps of making a bootable drive? There really is such a tool, which is the \u0026ldquo;bootable drive making magic tool Ventoy\u0026rdquo; to be introduced in this article!\nDownload Ventoy # Although Ventoy can also be downloaded from its official website, the speed is very slow. It is recommended to download it through the Github link. When downloading, choose the proper compressed package for you system(I think for most people the choice would be windows).\nAfter the download is completed, extract the file. Locate Ventoy2Disk.exe, and you can launch the Ventoy main program.\nFeature Introduction # When you open Ventoy, you should see an interface similar to the following figure.\nSome function items can be set in the menu bar. The device section lists the current USB drive devices. If they are not displayed, you can unplug and replug the USB drive, and then click the refresh button on the right to check. The section below the device lists the current local Ventoy version and the Ventoy version installed in the USB drive. If you have downloaded a new version of Ventoy, you can click the Upgrade Button below to update the version in the USB drive. Getting Started # Creating a Bootable USB Drive # First, insert your USB drive and open Ventoy. If you\u0026rsquo;re using it for the first time, only the local Ventoy version should be displayed.\nClick on the Configuration Options menu, select Secure Boot Support, and then click the installation button below to create a Ventoy bootable USB drive. Note that this operation will erase all data on the USB drive. Make sure there is no important data on the USB drive before proceeding.\nIf Ventoy has been installed previously and you want to upgrade it, there\u0026rsquo;s no need to worry. Ventoy upgrades will not affect local data, and you can upgrade it directly.\nAdding System Images # Okay, now the Ventoy bootable USB drive has been created. That\u0026rsquo;s it? Yes, it\u0026rsquo;s that simple!\nNow open the file manager, and you should see a USB drive named Ventoy. This is your bootable drive.\nWhat you need to do next is simple. Just directly copy all the …","date":"2022-12-11","externalUrl":null,"objectID":"/tutorials/ventoy/","permalink":"/tutorials/ventoy/","section":"Tutorials","summary":"","title":"Using Ventoy to Create a Universal Bootable USB Drive","type":"tutorials"},{"content":"A lazy guy.\n","date":"2020-04-22","externalUrl":null,"objectID":"/intro/","permalink":"/intro/","section":"Home","summary":"","title":"Introduction","type":"page"}]