Install and use tftp server on Centos.

1 Installation If the network is available, you can install it directly via yum. 1 yum install tftp-server You can also download the rpm package first and then install it, download at http://rpmfind.net/linux/rpm2html/search.php?query=tftp-server Then install. 1 rpm -ihv tftp-server-0.49-8.el6.x86_64.rpm After installation, you can find an additional in.tftpd file in the /usr/sbin directory. 1 2 $ ls /usr/sbin/in.tftpd /usr/sbin/in.tftpd 2 Configuration in.tftpd is managed through the xinetd service. /etc/xinetd.conf stores the default configuration of all services managed by xinetd, and also the default configuration of tftpd.

Go mod add gitlab private repository

1. set env 1 2 3 4 5 6 7 8 9 10 11 # Set the git address of the private repository go env -w GOPRIVATE="git@gitlab.xxx.cn" # Allow setting unsecured access to a repository that can be requested to an http address after configuration go env -w GOINSECURE="gitlab.xxx.cn" # Set the request to this address without a proxy, i.e. GOPROXY go env -w GONOPROXY="gitlab.xxx.cn" # Set not to verify the signature of sum packages go env -w GONOSUMDB="gitlab.

Go Assembly Overview

Direction The plan9 assembly operand direction is the opposite of the intel assembly direction, plan9 is left to right and intel is right to left. 1 2 3 4 5 // plan9 MOVQ $123, AX // intel MOV RAX, 123 Stack push and pop In plan9, there is no PUSH POP instruction for stack operation, but SUB and ADD respectively. SP is the top of stack pointer, which corresponds to BP bottom of stack pointer, usually only need to operate SP pointer to complete push and pop operations, so BP pointer is not used much.

Customizing images with Dockerfile

This article is a detailed explanation of Docker custom images, how to build your own Docker images, and the Dockerfile instructions. I. Using Dockerfile to customize images 1.1, Dockerfile customization image Customization of images is actually customizing the configuration and files added to each layer. If we can write a script for each layer to modify, install, build, and operate the commands, and use this script to build and customize the image, the problem of not being able to repeat, the problem of transparency of image construction, and the problem of volume will all be solved.

Hashcorp Vault Basic Tutorial

How do we manage the large amount of Secret information in our work? (For example, my project involves the storage of secret keys and passwords for OpenSSH, as well as the regular rotation and external invocation of this) Solidified in a configuration file, stored in a server file or Database stored as code on a git private repository, with strict access rights to the repository Hosted on a public cloud

Write your own WebAssembly modules using C and Emscripten

Like JavaScript, WebAssembly is a programming language that can be run in a browser, but it is more equivalent to assembly language. wasm files consist of binary bytecode (which can also be converted to an assembly-language-like text format for viewing) and can be generated from C/C++, Rust, and other compiled and executed programming languages. Of course, WebAssembly is also cross-platform, and compiled wasm files can be run in browsers on

What does Python 3.9 bring?

I’ve been learning about the new features that each new Python release brings that are helpful to developers. Today we’ll start with Python 3.9, which is very middle-of-the-road and doesn’t have many valuable changes. Add union operators to dict In PEP 584 - Add Union Operators To dict it is proposed to add 2 operators to dict, | and |=. There are two common ways to merge 2 dictionaries in the past:

Certificate management tools in Kubernetes - cert-manager

This article introduces cert-mangager, which is somewhat similar to certbot, but the difference is that it works in Kubernetes. cert-manager is an automated certificate management tool that automates the issuance and management of digital certificates from various sources and for various purposes in a Kubernetes cluster. It will ensure that certificates are valid and automatically renew them at the appropriate time. Note: The object managed by cert-manager is “certificate”. If

2022 Go Ecosystem rpc Framework Benchmark

This test was conducted for five common rpc frameworks: rpcx, one of the earliest Go ecosystem microservices frameworks, used by Sina, Good Future, etc. kitex, bytedance’s microservices framework arpc: a performance rpc framework by lesismal grpc: a Google-initiated open source rpc framework that supports cross-language and is widely used. The system is based on HTTP/2 protocol transport and uses Protocol Buffers as the interface description language. standard library of rpc/std_rpc: Go standard library comes with the rpc framework, currently in a maintenance state The latest version of each framework is used for testing:

Why floating-point arithmetic is inaccurate

Verify 1 2 3 4 >>> 0.3-0.2 0.09999999999999998 >>> 0.2-0.1 0.1 Verify a little deeper First write the tool. Write a function to display 64-bit 8-byte binary data. 1 2 3 4 5 6 7 8 9 10 11 12 import struct def byte2bin(s, g=8): o = [] for i in range(0, len(s), g): sub = s[i:min(i+g, len(s))] o.append(' '.join((f'{c:08b}' for c in sub))) return '\n'.join(o) print(byte2bin(b'abcdefghijklmnopqrstuvwxyz')) The output is as follows.

Rust Pin Advanced

The last article on Pin was a shallow introduction to what Pin is all about and why it is needed, but it is still not enough to master that part of knowledge, so this article hopes to systematically sort out the knowledge points related to Pin, so I named the title “Rust Pin Advanced”. Pin API Anatomy To understand Pin in depth, it is essential to be familiar with all of its methods.

Pin and Unpin in Rust

On February 28, 2019, Rust version 1.33 was released, adding new pinning APIs, mainly including these. std::pin::Pin std::marker::Unpin std::marker::PhantomPinned impl !Unpin for T When I first encountered these concepts, I felt that they were particularly convoluted and difficult to understand thoroughly. There are also many articles on the Internet about Pin and Unpin, but I feel that they are not particularly clear. It’s also difficult to understand the std::pin module documentation directly.

Implement a simple RTSP server

In the previous article, the RTSP protocol itself was briefly introduced, and this time we will talk about how to implement a simple RTSP server. Live555 Live555 is a C++ media library that supports a wide range of media services protocols, streaming, receiving and processing audio and video data in a variety of audio and video encoding formats. It is also one of the few available libraries, and its code is rather cumbersome, but it is simple enough for most people to get started with, so it is perfect for practice and rewriting.

RTSP Protocol Explained

When we talk about RTSP, it is actually not only the RTSP protocol itself, but we will actually inevitably talk about the following protocols. RTP (Real-time Transport Protocol): the protocol really used to transmit audio-video, generally based on the UDP protocol, with special attention to the fact that it uses an even number of ports. RTCP (Real-time Control Protocol): sister protocol to RTP, which provides quality of service (QoS) feedback by periodically sending statistical information, it uses an odd number of ports and is RTP port + 1.

Three git flows and the version release model

The biggest difference between using Git, and other version control systems, is that Git is a distributed system, and in each copy of the repository, there is a full amount of code, so conflicts are common in collaboration. Let’s look at three Git development models. git flow git flow is part of the first generation of the git development process. It is divided into two branches, develop and master, where all development is branched on develop and then periodically merged into master.

Kubernetes Resource Orchestration Series Part 1: Pod YAML

The Kubernetes Resource Orchestration Series, starting from the underlying Pod YAML, progressively explains related content, hoping to answer some of your questions about Kubernetes and give users a deeper understanding of cloud-native related technologies. 01 Pod Overall Structure The overall structure of Pod YAML can be initially divided into Resource, Object, Spec and Status. This article will focus on each of these four parts. Resource: Defines the type and version of the resource, as a mandatory attribute to get the resource from the Rest API.

How WebPush works

At this year’s developer conference, Apple announced that Safari will support the WebPush standard. The first support will be for the mac platform, which will be released this fall. Then it will be available for iOS in the first half of next year. By then, all major browsers will support WebPush features. This is a milestone for the Web! The Internet market is now desperately trying to promote mobile applications. One of the main reasons is that the retention rate of Web platform is very low, and the main reason for the low retention rate is the lack of push support.

Golang High Performance Programming Manual

Robust, readable and efficient code is a common goal for all of us developers. In this article, we will combine the features of Go language to give advice on common data structures, memory management and concurrency for writing more efficient code. Without further ado, let’s learn the techniques of Go high-performance programming together. 1. Common Data Structures 1.1 Don’t abuse reflection The standard library reflect provides the Go language with

Cross-language calls in Golang

There are specific scenarios where we are troubled by the fact that the performance of the current development language is still insufficient, such as video processing (in the field of live streaming), machine learning, and games. there are some excellent C/C++ libraries that cannot be reimplemented in the current development language for a while (FFmpeg, OpenCV, Protobuf, ZeroMQ, and a whole lot more). In general, we will tend to use several ways to solve this.

Golang Heap Profiling

Studying the performance of a program is important for every engineer, and I can even say this: It is a necessary skill for an engineer. Golang’s performance analysis tool, pprof, supports the following kinds of analysis. heap: a sampling of all living objects in current memory (almost a must for languages with GC), which can be used to analyze memory problems. profile: as opposed to heap, a sampling of the CPU, which can be used to analyze the time-consuming bottleneck of the program.