Chromium's ban on users removing built-in search engine causes problems, feature to return later

As we all know, browsers generally have a default search engine and a number of other search engines built in that you can replace, or add manually if none of the built-in ones meet your needs. If for some reason users do not want these search engines in their browser, they can remove them from the settings. However, in a recent update to Chromium 97, Chromium has changed these settings and the option to ‘remove’ these default search engines no longer exists.

Faker.js becomes a community-controlled project

A week after the authors of Faker.js vandalised their own open source projects, Faker.js and colors.js, Faker.js is now controlled by the community. The project is currently managed by a team of eight engineers from a variety of backgrounds and companies. Faker.js is a very popular Node.js tool library that provides various types of mock data for development debugging. The earliest Faker project was first implemented in 2004 by Jason Kohles using Perl.

Linux kernel 2021: Linus Torvalds most prolific, commit count down to 73.7k

2021 saw the consolidation of a number of kernel improvements, the introduction of new hardware support and much more. But while the year looks good for movement in the Linux kernel, the actual number of commits and lines is lower than ever. The tech site phoronix has summarized the relevant 2021 Git development statistics. As of December 31, 2021, when running GitStats on the Linux kernel source tree, the repository had received 1,060,172 commits from about 243,000 different authors.

Implementing VIP functionality with Raft

Background When deploying an application that is highly available, we usually place a HAProxy in front of the application so that when any one Server fails, the HAProxy will automatically switch over, but HAProxy also has a single point of failure, so we need more than one HAProxy to ensure that the business is not interrupted, and this time we need another software to work with: Keepalived. Keepalived is only

K8s drain command source code reading

Background I’ve written a previous article [“Kubernetes in Action - Smooth Node Removal”]) about how to remove nodes from a K8s cluster, and today I’ll take a look at what the kubectl drain command does and how it does it. kubectl K8s uses cobra as a command line builder (I don’t find cobra very useful and the documentation is unclear.) The actual processing logic is in pkg/kubectl/cmd/cmd.go, with a unified

How fsck works

Background We usually encounter a lot of file system anomalies after a system crash. We usually fix them with the fsck tool, today we will learn what fsck does and how it does it. Workload example Suppose there is a workload that appends a single block of data to an existing file. The append is done by opening the file, calling lseek() to move the file offset to the end of the file, and then issuing a single 4KB write to the file before closing it.

Explanation of basic file system concepts and common operations

Background A friend asked me a while ago what the difference between deleting a file and formatting it, and recently I happened to be reading the book “Unix Linux Programming Practice Tutorial”, chapter 4 of which is about the file system. The internal structure of the Unix file system From the user’s point of view, the files on a Unix system form a directory tree, each directory can contain files or other directories.

Several ways to communicate across tabs in the browser

The need for cross-tab communication is common in scenarios where there is a lot of content to browse or manipulate (e.g. blogs or CMS systems) and data consistency needs to be maintained. Most of these scenarios can be solved by bringing in a back-end service to keep the data consistent across multiple tabs by polling and so on. This article describes a pure front-end solution for cross-tab communication without introducing

Myths about useCallback

useCallback takes a callback function and an array of dependencies as arguments, and returns the cached callback function if each item in the dependency array remains the same. Since useCallback can cache functions, wouldn’t all functions in the Function component be wrapped in useCallback for the purpose of React application optimization? Don’t worry, let’s take a look at two examples and decide which one is better, App1 or App2?

Some new features in browsers and JavaScript

CookieStore API Currently, browsers can store cookie/sessionStorage/localStorage/IndexedDB, all of which expose a very developer friendly API, except for cookies. Think back to how we normally manipulate cookies. For example, if you want to retrieve a cookie, you have to parse it manually to get the value of a cookie because document.cookie returns a string that is the union of all cookies. If you want to add a cookie, then you

Explaining "this" in JavaScript from a new perspective

This article attempts to explain how the this keyword works in JavaScript from a new perspective: we assume that arrow functions are real functions, and that ordinary functions are just a special language construct. I think this explanation makes this better understood, so try it out. 1. Two kinds of functions This article focuses on two different kinds of functions. Normal functions: function () {} The arrow function: () =>

What about the technology of FreeBSD in 2024?

In order to better support the FreeBSD project, the FreeBSD Foundation team held strategic meetings with the Foundation Board and the FreeBSD Core Team to review user and developer survey results from the FreeBSD Core Team and to engage with developers, users, and other members of the FreeBSD community to determine their priorities - with the overall goal of expanding and strengthening the technical team. Based on input gathered from individual and commercial users, as well as market trends, the FreeBSD Foundation has developed a Technology Roadmap spanning nearly five years and encompassing four main areas.

youtube dl official web hosting platform sued by three major record labels

Sony, Universal and Warner are now suing the German hosting platform Uberspace; they argue that youtube-dl circumvents YouTube’s “rolling cipher” technology, which a German court found to be illegal in 2017. Uberspace is currently hosting the official youtube dl homepage. In October 2020, GitHub responded to a request from the Recording Industry Association of America’s RIAA to remove YouTube’s code, sparking a controversy in the open source community. controversy. The RIAA cited the DMCA’s anti-circumvention clause, claiming that the tool could be used to download their artists’ musical works from YouTube in violation of copyright.

Using graphql in ts

Scenarios graphql provides consistent api architecture metadata on the front and back ends, while speeding up the performance of web-backend interactions through request merging and on-demand fetching. Use with ts Basic idea scan all gql strings in the code get the graphql strings in the code and generate type definitions use these type definitions Steps to use Here is a demonstration using github api@v4 Get the back-end metadata 1 curl https://docs.

Directly point to the source code when referencing dependencies in monorepo

In a monorepo project, we may have dozens of lib modules, and lib modules that need to be published outside of monorepo must be packaged as js, with main/module pointing to the packaged js file so that everyone can use it. For example, a simple lib module like the following lib-a src README.md package.json tsconfig.json The package.json may point directly to the source code when the original release is not

React principle - lane priority and diff update

The model for handling priorities in React 16 is ExpirationTime, which uses a length of time to describe the priority of a task. React 17, on the other hand, uses the Lane model to handle task priorities, which is able to cover more boundary conditions by assigning different priorities to a bit and manipulating the priorities through 31-bit bitwise operations. In short: a binary number is used to represent the

The White House held the "open source security" summit, Apache / Google / Microsoft / Apple and other participants

Affected by the Log4j vulnerability, the U.S. White House this week held a meeting on open source security; discussing initiatives to improve open source software security and new ways to collaborate that could quickly drive improvements. As early as last December, White House National Security Advisor Jake Sullivan sent a letter to major technology companies indicating the need for such a conference; and in the letter noted that the maintenance of basic open source software by volunteers is a “national security issue.

Understanding Kotlin Suspend Functions

suspend is a callback Understanding suspend doesn’t really require getting hung up on what the magic “hang” means or how threads are switched. In fact, behind suspend is a very familiar callback. Suppose postItem consists of three asynchronous subtasks with dependencies: requestToken, createPost and processPost, all of which are callback-based APIs. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // 三个

Talking about the Context and Scope of Kotlin Coroutine

Intro Opening a Kotlin Coroutine requires calling the launch or async methods on the CoroutineScope. These extension methods defined on the CoroutineScope are called coroutine builder. 1 2 3 lifecycleScope.launch(Dispatchers.IO) { delay(1000) } In addition to the suspend block, additional parameters can be passed to the coroutine builder. For example, the above Dispatchers.IO specifies that the Coroutine block of launch is dispatched to the IO thread pool for execution. Signature

Why can't I use String.prototype.trim in a JS map?

Suppose we have an array of strings [' some ', ' strings '] and we need to clear the whitespace before and after the strings, the first thought is. 1 [' some ', ' strings '].map(s => s.trim()) For further optimization, consider removing the wrapped function from the map and using String.prototype.trim directly. however, the problem arises. 1 2 3 [' some ', ' strings '].map(String.prototype.trim) // TypeError: String.prototye.trim called