Automating Npm Package and Website Publishing with GitHub Actions

GitHub Actions has grown in popularity since GitHub announced its availability on the platform for all developers and repositories. Many third-party platforms have speed and other limitations in the ecosystem that will further push developers to migrate their software automation to GitHub Actions. In this article, I want to show you how I use GitHub Actions to publish npm packages that I maintain in open source projects. If you follow

Introduction to Kubernetes CRD v1

Preface The CRD API is now available in Kubernetes v1.16 GA, so I’m going to talk about some features and some common issues about CRD v1; I’ll probably mention the basics of CRD briefly, but not too much. The basics can be found in the official Kubernetes documentation. You can use this article more as a quick reference manual when you encounter problems. CRD is the most common and convenient way to extend Kubernetes.

Kubernetes Component Unit Testing Guide

Preface The concepts and basics of unit testing are not covered here, but you can refer to some official go guides and other materials on the web: LearnTesting TableDrivenTests For components that need to operate k8s, the key to single testing is how to construct a k8s cluster in the single testing function for the business function to CRUD the corresponding resources. The general idea of constructing a k8s cluster

Introduction to controller-runtime

Overview controller-runtime is a subproject of Kubebuilder, which provides a series of libraries for building controllers; Kubebuilder itself generates a lot of template code that uses controller-runtime. controller-runtime contains several The basic concepts are as follows. Controller: literally, a controller. Reconciler: provides the Reconcile function, the main part of the Controller and the entry function, which contains all the business logic of the controller (equivalent to the syncHandler function in

New DDoS attacks proliferate: TCP bounce amplification attacks using middleboxes

1. Introduction A new TCP reflection amplification attack technique launched using middleboxes was proposed by Kevin Bock et al. at the University of Maryland USENIX conference in August 2021: an attacker can exploit a vulnerability in TCP session identification in some network middleboxes to achieve a new DDoS reflection amplification attack. Unlike the TCP reflection launched using protocol stacks that could not amplify attack traffic that appeared in 2018, this new attack achieves the effect of TCP protocol-based traffic amplification, which makes the attack technique spread rapidly in the black market and proliferate across the network after its birth.

Musk acquired Twitter for $44 billion and announced that it will be open source, algorithm code repository instantly 5k+ star

According to the BBC, Tesla CEO Musk has successfully acquired Twitter entirely for $54.20 per share, for a total of $44 billion, and the company will then become a privately held entity. In a press release, Musk explained that he would work to make Twitter better than ever and promised to focus more on free speech. Free speech is the cornerstone of a functioning democracy, and Twitter is the digital town square.

Introduction to the Kubernetes Multi-Cluster Project

Why use cluster federation Kubernetes has claimed to support up to 5,000 nodes and 150,000 Pods in a single cluster since version 1.8, and few companies actually deploy such a large single cluster. In many cases, we may deploy multiple clusters for a variety of reasons, but want to manage them in a unified manner, so we can use cluster federation. Some typical application scenarios for cluster federation. High availability:

Compile and use GPU-accelerated ffmpeg

Recently, I am developing a video analysis system based on video streams. When using the browser to play the finished video, the browser needs the fmp4 format stream, which needs to be transcoded by ffmpeg. During the development phase, the CPU version of ffmpeg was used, but the online deployment was very unsatisfactory. So I compiled a GPU version. System Architecture 1 2 3 4 5 6 7 +----------------------------------------------------------------+ |

Taskfile - A better build tool than Makefile

I. What is Taskfile Taskfile describes various execution tasks via yaml, and its core is written in go; it is more modern and easier to use than Makefile’s tab splitting and bash combination syntax (although it becomes a yaml engineer). Taskfile has advanced features such as built-in dynamic variables, operating system and other environment variable recognition that are more in line with the modern way of Coding. In general, if

Are PSS/USS and RSS actually the same thing?

Since Go 1.12, people have been having problems with monitoring false positives. The reason for this is that Go changed the memory reclamation policy used by the madvise system call from MADV_DONTNEED to MADV_FREE starting in 1.12. From the available documentation, it appears that RSS, the most commonly used memory monitoring metric, does not reflect the portion of memory in the process that is not reclaimed by the OS. Naturally, there are some suggestions that RSS should be replaced with a more appropriate metric, such as PSS or even USS.

Android 14 development code name leaked! "Upside Down Cake"

Recently, Android developers have discovered an internal development codename for Android 14 - “Upside Down Cake” - in the Google Android open source project. Google has always had a tradition of using the names of cakes and candies as the code names for new systems, and Google Android 14, codenamed “Upside Down Cake”, also follows the same tradition for Android versions. With the release of each new system version, Google will name each version with the first letter of the dessert name, for example, Android 1.

What is Reverse Shell?

What is Reverse Shell We all know the concept of Shell, right? Simply put, Shell is the interface that implements user commands, through which we can control the computer, such as our common ssh is the Shell commands executed to achieve remote control of the server. So what is Reverse Shell? What exactly does it do? The console listens to a TCP/UDP port first, then the controlled side makes a request to this port and transfers its command line input and output to the console, so that the console can enter commands to control the controlled side.

Plug-in mechanism via WebAssembly

plug-in Two days ago in the study of coco plug-in system, we often say to interface-oriented development rather than implementation-oriented, plug-in this thing, like the middleware in the back-end framework, we follow the framework defined interface to implement middleware, which can also be considered a plug-in, we have many mechanisms to achieve “Pre-compiler plug-in”, but like coco to compile and release the binary program, what is the way to allow

How to implement parameter mutexing in TypeScript?

Previously, I wrote a markdown-related component that inserted the string generated by the back-end parsing of markdown into the DOM via dangerouslySetInnerHTML, and set a number of styles that were introduced via modular CSS. 1 2 3 4 5 6 7 8 import style from "./MarkdownBody.module.css" const MarkdownBody: react.FC<Props> = ({ content }) => { return ( <div className={style.markdown} dangerouslySetInnerHTML={{ __html: content }}></div> ) } It had been working fine

Rust Object Oriented

How to quickly customize a collection type? A programmer familiar with some object-oriented languages might write it like this. 1 2 class MyCollection(Collection): ... Inherit some built-in type (if it exists) and extend on top of that built-in type. But for programmers familiar with Python, this is not a good idea. Types of ducks When a bird is seen walking like a duck, swimming like a duck, and quacking like

Some tips on TypeScript combined with React development

TypeScript is a superset of JavaScript that brings static type support to JS, which can help us write clearer and more reliable interfaces and bring better IDE hints. It’s been a while since I’ve used TypeScript with React in a front-end project, and it’s time to write a blog summary to share. The following is a list of some points that I personally find helpful in doing projects. Using automatic

Prometheus Long Term Remote Storage Solution VictoriaMetrics Getting Started

VictoriaMetrics (VM) is a highly available, cost-effective and scalable monitoring solution and time series database for long-term remote storage of Prometheus monitoring data. Compared to Thanos, VictoriaMetrics is primarily a horizontally scalable local full-volume persistent storage solution, VictoriaMetrics is more than just a temporal database, its advantages are mainly reflected in the following points. External support for Prometheus-related APIs, which can be used directly in Grafana as a Prometheus data

Replacing the C version, the Ruby YJIT compiler implemented in Rust is complete

Last December, members of the Ruby JIT team proposed to port the YJIT codebase from C99 to Rust, and while a number of developers had reservations about this, the project was eventually approved by Ruby’s core developers and founder Matz. Yesterday, the developers responsible for this project said they had completed a Ruby YJIT compiler implemented in Rust that effectively replaces the existing C version and is currently awaiting an upstream merge.

A few notable changes in Go 1.18

On March 15, 2022, the Go team officially announced the release of Go 1.18 on the official blog. The addition of generics makes Go 1.18 another milestone release after Go 1.0 (the first official release), Go 1.5 (implementation of bootstrap, de-C code, new version of GC), and Go 1.11 (introduction of Go module) versions. Generics are the biggest syntax feature change in the Go language since it was open-sourced, and

Golang's efficient development model

Background When I was working on Go server development in my company, I found that there was a lack of Go development best practices, which led to the following phenomena confusion when developing with Go, not knowing how to start and how to work more efficiently. the phenomenon of code duplication was more serious. the code quality of the project was uneven, resulting in uneven quality of the delivered product. black box product operation, poor observability, can run on the line.