Posts

How to reset git

 rm -rf .git

How to use rar file on ubuntu

run the following commanda: sudo apt update && sudo apt upgrade sudo apt install unrar unrar x -kb archive.rar

Update software on Ubuntu 22.04 (arm64)

sudo apt update sudo apt upgrade

The relationship between pages/_app.js and pages/index.js in a Next.js

The relationship between pages/_app.js and pages/index.js in a Next.js application is foundational to how Next.js handles page rendering and application structure. Here's an overview of their roles and interplay: pages/_app.js - The Custom App Component : This is a special file in Next.js that allows you to override the default App component used by Next.js. It's the top-level component that gets executed for every page visit. It's useful for implementing application-wide page layouts or injecting additional data into pages. Whatever you include in _app.js (like global CSS, layout components, context providers) is accessible in every page of your application. It receives a Component prop, which is the active page being rendered (e.g., the content of pages/index.js or any other page), and pageProps , which are props specific to each page. pages/index.js - A Page Component : This file represents the homepage of your Next.js application. It's what gets rendered when

WSL2配置proxychains, 使得终端走宿主机代理

安装:           sudo apt-get update           sudo apt-get upgrade           sudo apt-get install proxychains4 获得宿主机 IP: cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' 查询代理软件端口:10810 编辑配置文件:sudo nano /etc/proxychains4.conf           change:socks4 127.0.0.1 9095         to:socks5 xxx.xxx.xxx.xxx 10810         中间的x是上面查出来的ip地址,10810是v2rayN局域网(不是本地)监听的端口。          并在 [ProxyList]之前添加:           # Exclude localhost           localnet 127.0.0.0/255.0.0.0 测试:           proxychains4 curl -L myip.ipip.net           proxychains4 curl -L cip.cc vscode走代理:proxychains4 code . 更新proxychains:           sudo apt-get update # This will update the list of available packages           sudo apt-get upgrade # This will upgrade the installed packages to the latest versions 注意:proxychains 与 proxifier 会冲突,只需用二者之一。 参考文献:           WSL2配置proxychains           WSL2 中访问宿主机 Windows 的代理           WSL2配置网络代理

In the process of data transfer, what are differences between server side sessions and authentication tokens?

Server-side sessions and authentication tokens are both methods used to authenticate users and maintain their state over the internet. However, they differ in how they store and manage this information. Server-Side Sessions In server-side sessions, the user state is stored on the server's memory. When a user logs in, the server creates and stores the session data (such as user account data and role) in its memory. The server then sends a session ID to the user's browser, which is typically stored in a cookie. This session ID is sent back to the server with each subsequent request, allowing the server to recognize and authenticate the user. This method requires the server to keep track of active sessions, which can consume significant memory resources if there are many concurrent users . Authentication Tokens Authentication tokens, on the other hand, encapsulate the user state within the token itself. When a user logs in, the server generates a token that contains user informati

About Seedr

Seedr is a cloud-based torrent client that allows users to download torrents and store them in a virtual drive, eliminating the need for a local storage device. With Seedr, users can access their torrents anytime and anywhere, as long as they have an internet connection. One of the key benefits of Seedr is its ease of use. To start downloading torrents, all you need to do is sign up for an account and paste the torrent link into the platform. Seedr will take care of the rest, downloading the torrent in the background and saving it to your virtual drive. This makes it a great option for people who don't have the space or technical know-how to set up their own torrent client. Another advantage of Seedr is its speed. The platform uses a high-speed server network to download torrents, meaning you can get your files faster than with traditional torrent clients. Seedr also offers a premium service that provides users with even faster download speeds and additional storage space. One of t