How to exclude filtered output from Linux Grep

grep is a powerful command line tool for searching one or more input files for lines that match a regular expression and writing each matching line to standard output. In this tutorial, we will show you how to use grep to filter the output and exclude . This includes excluding lines that don’t match, excluding directories and files, etc. Exclude lines that do not match To print only the lines that do not match the search pattern, use the -v (or -invert-match) option.

Solve kubeadm initialization exception: dial tcp 127.0.0.1:10248: connect: connection refused

Kubernetes, often abbreviated as K8s, is an open-source system for automating the deployment, scaling, and management of containerized containerized applications in an open source system. The system was designed by Google and donated to the Cloud Native Computing Foundation (Linux Foundation). It is designed to provide a platform for automated deployment, scaling, and running application containers across host clusters. It supports a range of container tools, including Docker and others.

New proposal for Go language "arena": optimizing memory allocation

The Go language community is discussing a new proposal called “arena”. According to the proposal, “Go arena” is used to optimize memory allocation. arena is a method of allocating a set of memory objects from contiguous memory regions, with the advantage that allocating objects from arena is generally more efficient than general memory allocation. More importantly, objects in arena can be released all at once with minimal memory management or garbage collection overhead.

How to install MongoDB on CentOS 8

MongoDB is a free open source document database. It belongs to a family of databases called NoSQL, which is different from traditional table-based SQL databases such as MySQL and PostgreSQL. In MongoDB, data is stored in flexible JSON-like documents, with fields varying with the document. It does not require a predefined schema and the data structure can change over time. This tutorial describes how to install and configure MongoDB Community Edition on CentOS 8 server.

Using namespaces to organize TypeScript code.

With the increasing use of third-party libraries in software, we often encounter the problem of global namespaces being polluted, leading to name conflicts between components in the global namespace. As a result, we need to use namespaces to organize blocks of code in order to uniquely identify variables, objects, and classes. In this article, we will discuss namespaces, when they are needed, and how they can be used to enhance the organization of TypeScript code.

Some concepts of nginx

Nginx is a web server that acts as a reverse proxy, load balancer, mail proxy and HTTP cache, and follows a master-slave architecture. A complicated term and a confusing definition filled with big confusing words, right? Don’t worry, I can help you first understand the basics of the architecture and terminology in Nginx. Then, we’ll move on to installing and creating Nginx configurations. To make things easy, just remember: Nginx is an amazing web server .

Top 5 Typescript Dependency Injection Container

The original JavaScript environment lacked a static type system and had little support for containerized dependency injection, making the code I wrote prone to obvious errors and nearly impossible to test. TypeScript’s compile-time type system changes all that, allowing continuous development of complex projects. It has brought back design patterns such as dependency injection, proper typing and passing of dependencies during object construction, which promotes more structured programming and helps write tests without the need for patching.

Find and Replace in Vim/Vi

This article describes how to find and replace text in Vim/Vi. Vim is the most popular command line text editor. It comes pre-installed on macOS and most Linux distributions. Finding and replacing text in Vim is very easy. Basic Find and Replace In Vim, you can use the :substitute (:s) command to find and replace text. To run commands in Vim, you must be in normal mode, which is the default mode when you start the editor.

Who inherits the code after the death of an open source author?

In early 2008, Australian brothers Simon Zerner and Toby Zerner started the development of esoTalk. Unfortunately, esoTalk was still in Alpha phase when the lead developer brother Simon passed away in mid-2009. It was his brother Toby who replaced Simon in maintaining and updating esoTalk. In the README.md file, it says: “esoTalk was developed by Toby Zerner in memory of his brother Simon.” In the end, the two brothers left behind an open source forum system developed with PHP+MySQL, with very simple, fast and modern features.

How to quickly locate Flutter APP memory leaks

When an APP grows with business, useless features pile up, the team of developers grows, and the code expands in a big way, despite a series of process restraints such as manual review, code specification, static lint check and so on, it cannot stop the collapsing universe from evolving into an unfathomable black hole. Among them, there is no greater headache than “memory leak”. What is a memory leak? It’s

Flutter Raw Image Provider

The Image Widget in Flutter has built-in support for files in the form of file, network, and memory. However, these only support regular compressed image files or binary data, such as jpg, png, webp files, etc. There is no support for raw rgba binary data. Raw binary data here refers to the array of bytes consisting of the color values of each pixel of an image. A picture has width x height pixel points, the color value of a pixel point is stored with 32bit, divided into 4 channels, each channel occupies 8bit, respectively, red, green, blue, transparency (RGBA), this array is the collection of color values of each pixel point, dart in general use Uint8List.

The most common mistakes that beginners make when practicing Flutter

Typical error one: Future that cannot be mastered Typical error message: NoSuchMethodError: The method 'markNeedsBuild' was called on null. This error is often found in asynchronous task (Future) processing, such as a page requesting a web API data and refreshing the Widget State based on the data. This error occurs when the asynchronous task ends after the page has been popped, but does not check if the State is still

Memcached Meta Commands

Memcached is the oldest in-memory caching server. Because it doesn’t support as rich a data structure as Redis, Memcached is used less and less. But I think Memcached is a great example of the Unix philosophy of doing one thing at a time and doing it well. And Memcached is focused on the one thing that is memory caching. This is best demonstrated by the introduction of Meta Commands in Memcached in version 1.

What are the new features in C# 11?

NET Principal Program Manager Kathleen blogged about some of the new preview features of C# 11 that can be experienced in Visual Studio 17.1 and .NET SDK 6.0.200. Here are some excerpts to introduce some of the new features. C# 11 Preview: Allow line breaks in “interpolation expressions” for interpolated strings interpolated strings (interpolated strings) is a syntax introduced in C# 6.0 that allows the insertion of expressions into strings. C#’s interpolated strings are divided into non-word-by-word and word-by-word interpolated strings ($"" and $@"", respectively).

Linux kernel upgrades C language standard

According to news on the Linux kernel mailing list, the community recently discussed whether to adopt the modern C language standard for the kernel. While the Linux kernel is evolving rapidly, it also relies on some very old tools, one of which is that the kernel code is still using the 1989 version of the C language standard - a standard that was written more than 30 years ago before the kernel project was started.

How to install Ubuntu on a Raspberry Pi

Raspberry Pi is the most popular single-board computer ever made. It can be used for a variety of purposes such as desktops, home media centers, smart Wi-Fi routers, automation systems, and gaming servers. The use cases are endless. If your Raspberry Pi does NOT have an SD card with NOOBS pre-installed, you will need to manually install the OS on the SD card. You can run many different operating systems on your Raspberry Pi, including Windows 10 IoT, FreeBSD, and various Linux distributions such as Arch Linux and Raspbian .

How to install and use FFmpeg on Debian 10

FFmpeg is a free open source toolset for working with multimedia files. It contains a set of shared audio and video libraries such as libavcodec, libavformat and libavutil. Using FFmpeg, you can convert between various video and audio formats, set sample rates, capture streaming audio/video and resize video. This article describes how to install and use FFmpeg on Debian 10 Linux. Installing FFmpeg on Debian The official Debian repository contains the FFmpeg package, which can be installed using the apt package manager.

How to find and kill zombie processes in Linux

Before we get into the Zombie process, let me recall what a process is in Linux. In short, a process is a program instance. It can be foreground (interactive process) or background (non-interactive or automatic process). It can be a parent process (the creator of other processes at runtime) or a child process (a process created by other processes). In Linux, every process has a parent process, except for the first init (or systemd) process with a PID of 0.

How to kill inactive SSH sessions

When you have been disconnected from the server several times, causing the ssh session to be inactive. You know this because when you use the " w" command, you will see the following …… 1 2 3 4 22:47:28 up 315 days, 21:09, 2 users, load average: 9.04, 8.17, 7.30 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 ipxxx-xxx-xxx-xxx 23:54 26:40 9.26s 0.86s -bash root pts/1 ipxxx-xxx-xxx-xxx 22:44 0.

Alternatives to htop - btop

Meet btop, an aesthetically pleasing system resource monitor that displays processor, memory, disk, network and process usage and statistics. btop is a lighter, faster version of C++, and is a continuation of bashtop and bpytop. Over the years, the options available for command-line system monitoring tools have grown considerably. There are top, htop, glances, nmon, ytop, gtop, vtop and atop to name a few. In Linux administration, it is important to monitor system performance and hardware resource usage in real time.