Rocky Linux系统初始化常用基础命令和工具包的便捷安装脚本(ljq@GitHub)

Rocky Linux系统初始化常用基础命令和工具包的便捷安装脚本(ljq@GitHub)

Description: A script to check system version and installed tools on Rocky Linux.(脚本描述:一个用于检查系统版本和Rocky Linux系统初始化工具的便捷脚本,安装系统常用命令和工具包。)

Author: Jacoliu (ljq@GitHub)
Usage: ./rocky-linux-init.sh
Version: 1.0
Date: 2023-07-04
License: MIT
Page Site: https://github.com/ljq

release-version/rocky-linux/rocky-linux-init.sh

Rocky Linux 发行版本默认检查安装基础工具包含:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Define tools list in lowercase
tools=(
"vim" # 0
"ping" # 1
"net-tools" # 2
"firewalld" # 3
"tar" # 4
"gzip" # 5
"bzip2" # 6
"wget" # 7
"curl" # 8
"python 3" # 9
"git" # 10
"ncurses" # 11
)
Read more
MySQL 8.0为什么使用utf8mb4_0900_ai_ci默认校对规则,而不使用utf8mb4_general_ci?

MySQL 8.0为什么使用utf8mb4_0900_ai_ci默认校对规则,而不使用utf8mb4_general_ci?

MySQL 8.0 选择 utf8mb4_0900_ai_ci作为默认校对规则原因

  • 主要的考虑主要基于对全球化支持的增强,基于Unicode 9.0规范,utf8mb4_0900_ai_ci在未来可以更容易地适应新的Unicode规范和扩展字符集。
  • 更精确的字符处理以及适应现代应用需求等方面。

两者差异对比要点:

  • 全球化支持的增强

    • 更广泛的字符集支持:utf8mb4_0900_ai_ci支持Unicode 9.0标准,这意味着它可以存储和处理更多的字符,包括许多特殊的emoji表情和其他少见字符。这对于现代应用程序尤为重要,因为它们常常需要处理这些扩展字符集。
    • 多语言环境的适用性:随着全球化的发展,应用程序需要支持多种语言和字符集。utf8mb4_0900_ai_ci不仅支持更多的语言和字符,还能更准确地处理这些语言中的特定字符问题。
    • 国际化应用的优选:在涉及多语言和国际化处理的应用中,utf8mb4_0900_ai_ci能够提供更全面的支持,确保数据的准确性和一致性。
  • 更精确的字符处理

    • 不区分重音和大小写:与utf8mb4_general_ci相比,utf8mb4_0900_ai_ci在比较和排序字符时不区分重音和大小写。例如,‘é’和‘e’被认为是相同的字符,‘A’和‘a’也被认为是相同的字符。这种规则对于处理语言如西班牙语和法语等重音丰富的语言尤为重要。
    • 基于Unicode 9.0的排序和比较规则:通过实现Unicode 9.0的排序和比较规则,utf8mb4_0900_ai_ci提供了更精确、更现代的Unicode支持。这确保了在数据库中对字符进行排序和比较时能够按照最新的国际化标准进行。
    • 提升搜索和排序的准确性:由于其先进的排序规则,utf8mb4_0900_ai_ci能够更准确地处理涉及重音符号的字符排序,这在许多语言中是必需的。
Read more
《如何创建一家像谷歌一样的公司》(How to start Google)- paulgraham - 转载

《如何创建一家像谷歌一样的公司》(How to start Google)- paulgraham - 转载

文章原文地址:https://paulgraham.com/google.html (作者:保罗格雷厄姆)

《如何创建一家像谷歌一样的公司》(How to start Google)

2024 年 3 月

(这是我给14岁和15岁的孩子们做的演讲,内容是如果他们以后想要创业的话现在该怎么做。很多学校认为他们应该告诉学生一些关于创业的事情。这就是我认为他们应该告诉他们的。 )

你们中的大多数人可能认为,当您被释放到所谓的现实世界中时,您最终将不得不找到某种工作。 这不是真的,今天我要谈谈一个可以用来避免找工作的技巧。

诀窍是创办自己的公司。 所以这并不是逃避工作的伎俩,因为如果你创办自己的公司,你会比从事普通工作时更加努力。 但你会避免工作带来的许多烦人的事情,包括老板告诉你该做什么。

Read more
WDFT (Warped Discrete Fourier Transform)
AI drawing ControlNet local implementation steps by stable-diffusion-webui(AI绘画ControlNet本地构建实施步骤 by stable-diffusion-webui)

AI drawing ControlNet local implementation steps by stable-diffusion-webui(AI绘画ControlNet本地构建实施步骤 by stable-diffusion-webui)

Install stable-diffusion-webui

[Note]:

  • Unable to install due to network problems, it is recommended to use GIT source pull installation
    (因网络问题导致无法安装,故建议使用GIT源码拉取安装方式)
  • Due to the large size of the model file, it is recommended to ensure sufficient space before installation: At least [source code + data model + extension]25G
    (因模型文件较大,建议安装前确保有足够空间: 至少[源码+数据模型+扩展]25G)
  • The PC terminal to be built is 🍎 macOS Ventura 13.4.1(c), and the Windows environment is built in much the same way.
    (构建PC终端是🍎 macOS Ventura 13.4.1(c),Windows系统环境构建方式大同小异)
  • Basic build tools (brew management recommended)
    (基础构建工具(推荐brew管理))
    1
    2
    3
    4
    5
    6
    cmake
    wget
    git
    rust
    protobuf
    python3.x
Project key directory(项目关键目录)
  • stable-diffusion-webui/extensions (扩展)
  • stable-diffusion-webui/models (模型)

Construction steps(构建步骤)

Read more
Tribute to the great legendary philanthropist and programmer Bram Moolenaar, the original author and software maintainer of VIM(致敬伟大传奇的慈善家和程序员Bram Moolenaar,VIM最初作者和软件维护者)

Tribute to the great legendary philanthropist and programmer Bram Moolenaar, the original author and software maintainer of VIM(致敬伟大传奇的慈善家和程序员Bram Moolenaar,VIM最初作者和软件维护者)

Tribute to the great legendary philanthropist and programmer Bram Moolenaar, the original author and software maintainer of VIM(致敬伟大传奇的慈善家和程序员Bram Moolenaar,VIM最初作者和软件维护者)

Bram Moolenaar is a Dutch computer programmer and the creator of the famous text editor Vim.

Bram Moolenaar was born in 1961 in The Hague, Netherlands. In his career, he has worked in multiple fields such as software development and system management. However, his most well-known contribution was the creation of Vim, a popular text editor.

In 1991, the standard editor Vi for Unix at that time had very limited versions on the MS-DOS platform, and Bram Moolenaar decided to develop a more powerful and scalable editor. He released the first version of Vim (Vi IMimproved) in 1991 and continued to drive its subsequent development and improvement.

Read more
Linux login shell信息展示类(neofetch、motd等banner类提示信息展示)导致的rsync服务不可用问题注意事项

Linux login shell信息展示类(neofetch、motd等banner类提示信息展示)导致的rsync服务不可用问题注意事项

终端报错信息(以Debian 11 系统为例):protocol version mismatch — is your shell clean?
系统环境
  • OS: Debian GNU/Linux 11 (bullseye) x86_64
  • Host: KVM RHEL 7.6.0 PC (i440FX + PIIX, 1996)
  • Kernel: 5.10.0-22-amd64
问题描述
  • 【问题】:导致rsync服务同步失败,报错信息: "protocol version mismatch — is your shell clean?"

  • 【原因】:rsync等工具非常依赖于shell执行时没有任何输出。

  • 【建议】:不建议在.bashrc中输出neofetch、banner类和motd类提示信息,在~/.profile中source ~/.bashrc可以避免此问题,但需注意.profile循环引用执行问题。

Read more
Centos7-chattr权限问题导致锁定文件无法解锁且root用户无法编辑

Centos7-chattr权限问题导致锁定文件无法解锁且root用户无法编辑

chattr

chattr 命令,专门用来修改文件或目录的隐藏属性。在部分linux发行版中,部分存在chattr本身执行权限移除的默认设置,导致root用户无法编辑相关文件且chattr命令无法修改文件属性。解决的思路是先解决chattr本身的文件属性,确保chattr可用。

解决方案如下:

Read more
macOS系统升级导致brew发行包Nginx服务Service无法启动或启动失败问题解决(MacOS Ventura 13.3)

macOS系统升级导致brew发行包Nginx服务Service无法启动或启动失败问题解决(MacOS Ventura 13.3)

macOS系统升级导致brew发行包Nginx服务Service无法启动或启动失败问题解决(MacOS Ventura 13.3)

系统版本:MacOS Ventura 13.3

Nginx服务启动失败问题描述:

MacOS系统升级导致brew发行包Nginx服务Service无法启动或启动失败,提示隐私或权限问题,系统限制root用户运行。

解决方案:

此脚本用于解决MacOS升级新版后,基于Homebrew发行的Nginx包守护服务无法启动运行问题。
此问题一般由MacOS更新的权限隐私策略与nginx守护服务权限冲突导致服务无法启动。该脚本通过直接操作nginx服务进程实现服务的快捷管理,增加常用进程基础检查操作,封装快捷操作脚本。

ljq@GitHub

Homebrew安装nginx:

1
brew install nginx

macos_nginx_brew_service.sh

Read more
MacOS English terminal Chinese garbled characters solution (MacOS英文环境终端中文内容乱码问题解决)

MacOS English terminal Chinese garbled characters solution (MacOS英文环境终端中文内容乱码问题解决)

Problem presentation

1
2
3
4
5
6
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"

warning: Falling back to a fallback locale ("en_US.UTF-8").

此问题常见于MacOS系统升级、OpenSSL升级后,terminal终端ssh远程链接时发出警告。

Solution

在MacOS本地终端:

1
sudo vi /etc/ssh/ssh_config

注释默认配置:

1
SendEnv LANG LC_*

重启终端即可。

References

参考