Installing Deepin Desktop on Manjaro

Deepin desktop version of the Manjaro community is no longer maintained, want to use deepin desktop also need to install their own, the installation process encountered more problems, recorded. Step 1: Install Manjaro I downloaded the Plasma Desktop version of Manjaro, which is the KDE version, and other versions should be similar. Update your system after the installation is complete. Step 2: Install xorg Xorg is an open source implementation

Most commonly used WebAssembly languages: Rust and JavaScript

A new “The State of WebAssembly 2022” survey is out, “It’s been a pretty good year for WebAssembly, it’s been a pretty good year”. Some highlights of the report include. Rust usage and desire continues to climb Python usage has increased significantly JavaScript has become a viable WebAssembly language Blazor has also seen a significant increase in usage and desirability Wasmtime is the most widely used runtime Use of WebAssembly for serverless, containerization, and as a plugin host has climbed significantly Respondents say they are already using WebAssembly more frequently Non-browser APIs are most needed for WebAssembly Specifically, when asked about “languages used, or whether they have tried to develop in WebAssembly,” 45 percent of respondents said they often or sometimes use Rust; in last year’s survey, Rust topped the list.

iptables 15-Minute Tutorial & Common Commands Summary

iptables is a very classic firewall tool for Linux, but the learning curve is very high due to its complex structure, long official documentation, many parameters, and awkward configuration (default does not support persistence, commands added to take effect, etc.), and risky configuration (accidentally lose connection with the server). It is extremely unfriendly to Linux newbies or people with poor memory (I have a very poor memory). The purpose of

How to use the shell (3/3) - Configuring zsh

Lightweight, clean, simple. This is what I’m looking for in a zsh configuration Starting the shell First, let’s review the shell login and interaction Interaction The shell may or may not interact. Normal startup requires interaction if you type a command and wait for it to return, but no interaction is required if you run the script directly echo $- determines if there is an interaction, each letter represents an

How to use the shell (2/3) - The new era of the shell

Fish (Friendly Interactive shell) This is a groundbreaking shell that creates a new shell user interaction experience. Syntax highlighting, auto-completion based on manpage, auto-suggestions are all its firsts! 2B youth with bash, ordinary youth with zsh, literary youth with fish. The default configuration of fish is really good, the configuration file is: ~/.config/fish/config.fish fish uses functions to set behavior: fish fully uses functions to customize behavior, you can customize fish’s

How to use the shell (1/3) - shell compatibility and history

The name and concept of the shell evolved from its Unix predecessor, Multics. Applications are invoked and executed by the system through the shell. The general term sh refers to bsh (Bourne shell), but Bourne shell is not bash. bash is Bourne Again Shell. Thompson shell The Thompson shell (or V6 shell) was the first Unix shell in history, written by Ken Thompson and added to UNIX in 1971. It

Memory Order in C++

C++11 includes multithreading as a standard. Once multi-threading is involved, there are issues such as concurrency, data race, thread synchronization, etc. C++ provides standard libraries such as std::mutex and std::atomic for this purpose. One important concept for manipulating atomic variables is memory order, which involves many concepts and can be difficult to understand. In this article, we will talk about this topic. This article may be a bit long and

Testing Network Connectivity with Blackbox Exporter

If you need to monitor the network status between two hosts, hosts and external services, then try the Blackbox Exporter mentioned in this article. 1. Install Blackbox Download the binary package 1 2 3 4 5 wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.21.0/blackbox_exporter-0.21.0.linux-amd64.tar.gz tar -xzvf blackbox_exporter-0.21.0.linux-amd64.tar.gz mv blackbox_exporter-0.21.0.linux-amd64/blackbox_exporter /usr/bin/ mkdir /etc/prometheus mv blackbox_exporter-0.21.0.linux-amd64/blackbox.yml /etc/prometheus/ Clean up the installation package 1 rm -rf blackbox_exporter-0.21.0.linux-amd64* Create a new Systemd service 1 vim /usr/lib/systemd/system/blackbox_exporter.service Add the following content:

A question about stack allocation

I was writing a new project a while ago, and I didn’t use a large library like Qt in order to improve some speed. When I was doing process management, I encountered a strange crash problem. Since I seldom write such code, I thought it was normal to have problems, but after a long time of troubleshooting, I couldn’t find the problem. After revisiting how the OS manages processes, I found the problem.

Implementing Grafana Loki-based Log Alerts

For a production environment and an aspiring ops person, even millisecond level downtime is not tolerated. Proper logging and monitoring of infrastructure and applications is very helpful in solving problems, and can also help optimize costs and resources, as well as help detect some problems that may occur later. Earlier we learned to use Prometheus for monitoring alerts, but if we use Loki to collect logs can alerts be made

The Docker service mapped to 127.0.0.1 can be accessed directly from outside the host

One of the postings on Hacker News that caught attention over the last couple of days was an email sent to the Docker security team that focused on a very outrageous security concern with Docker. Even if you expose the port to a loopback address with a parameter like -p 127.0.0.1:80:80, the service can still be accessed externally, what happened? The reason for this is simple: Docker has added this Iptables rule.

Advantages of WebAssembly and use scenarios

WebAssembly (Wasm) is a binary instruction format for stack-based virtual machines, a low-level assembly language designed to be very close to compiled machine code and very close to native performance. This article will introduce its advantages and usage scenarios, and experience the process of WebAssembly project development through code. Simply put, Wasm is a compilation target that allows code written in about 30 languages to be compiled into .wasm files using WebAssembly-specific tools.

Rust 1.63 will support Scoped Thread

Members of the Rust development team introduced an important new feature to be added to the Rust 1.63 standard library: scoped thread. This is described as a system-level thread, and unlike thread::spawn(), scoped thread supports the use of local variables by threads, not just static variables. Official example. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 use std::thread; let mut a = vec!

Deploying a production cluster using the Loki microservice model

We mentioned earlier the monolithic and read-write separation modes of Loki deployment, and when your daily log size exceeds terabytes, then we may need to use the microservice mode to deploy Loki. The microservice deployment pattern instantiates Loki’s components as distinct processes, each of which is invoked and assigned a target, and each of which generates a gRPC server for internal requests and an HTTP service for external API requests.

Why is eBPF so popular?

The eBPF is a register-based virtual machine originally designed to filter network packets, and is known as the Extended Berkeley Packet Filter (eBPF) since the original paper was written at the Lawrence Berkeley National Laboratory. This paper will explain why eBPF is so popular in easy-to-understand language. Introduction to eBPF In layman’s terms, eBPF is a custom program that runs in the kernel of the operating system when triggered by an event.

HTTP/3 Principles and Practices

After the HTTP/2 standard was published in 2015, most major browsers also supported the standard by the end of that year. Since then, with the advantages of multiplexing, header compression, server push, HTTP/2 has been favored by more and more developers. Unknowingly, HTTP has already reached its third generation. Tencent also follows the technology trend, and many projects are gradually using HTTP/3. In this article, we talk about the principle of HTTP/3 and the way of business access.

Resolving K8s scheduling imbalances

1. Preface In our recent work, we found that some nodes in the K8s cluster had high resource usage and some nodes had low resource usage. We tried to redeploy the application and evict the Pod, but found that it did not effectively solve the load imbalance problem. After learning the Kubernetes scheduling principle, we retooled the Request configuration and introduced the scheduling plugin to finally solve the problem. This

What happens when you delete namespace in k8s

1. Overview Namespace is an important concept in kubernetes, an abstraction of a set of resources and objects, often used to isolate different users. namespace has many resources under it, such as our common deployment, pods, service, ingress, configmap, and so on. Of course, the focus of this article is on what happens when namespace is deleted. A typical scenario is when executing kubectl delete ns test in the terminal, we will observe that after executing the command, the test namespace will immediately enter the terminating state, and will only be actually deleted after a few seconds.

Garbage collection mechanism in kubernetes

1. Overview A running kubernetes cluster stores a lot of interrelated resources, such as deployment, replicaset and pod, which are a set of related resources that we commonly use. When we create a deployment, the relevant controller automatically creates the replicaset, and then the controller of the replicaset creates the pod to run the service we deployed. This mechanism is called garbage collection (hereinafter referred to as GC). In earlier

Recovering mysql data via binlog

binlog is a binary file saved by mysql, which can be used to recover data, synchronize data, etc. If you want Mysql to generate binlog automatically, you need to turn it on in the configuration file. If you don’t know where your mysql default configuration file is? You can find it with the following command. 1 2 3 mysql --help | grep 'Default options' -A 1 /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf vim /etc/my.