以管理员权限运行 CMD,依次输入以下命令。
- 卸载已安装密钥
slmgr.vbs /upk
以管理员权限运行 CMD,依次输入以下命令。
slmgr.vbs /upk
services:
gitlab:
image: gitlab/gitlab-ce:17.7.0-ce.0
container_name: roger-gitlab
restart: always
hostname: "gitlab.luojia.work"
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.luojia.work:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2424
ports:
- "8929:8929"
- "2424:22"
volumes:
- "./volumes/config:/etc/gitlab"
- "./volumes/logs:/var/log/gitlab"
- "./volumes/data:/var/opt/gitlab"
shm_size: "256m"
gitlab-runner:
image: gitlab/gitlab-runner:v17.7.0
container_name: roger-gitlab-runner
restart: always
depends_on:
- gitlab
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./volumes/config/gitlab-runner:/etc/gitlab-runner"
- "./volumes/bin/docker:/usr/bin/docker"
command: ["run", "--user=root", "--working-directory=/home/gitlab-runner"]
privileged: true
Sometimes docker can not pull images, we need to configure the proxy.
Create /etc/systemd/system/docker.service.d/http-proxy.conf.
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:7890"
Environment="HTTPS_PROXY=http://127.0.0.1:7890"
Environment="NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
Sometimes k8s containerd can not pull images, we need to configure the proxy.
sudo systemctl set-environment HTTP_PROXY=127.0.0.1:7890
sudo systemctl set-environment HTTPS_PROXY=127.0.0.1:7890
sudo systemctl set-environment NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local,.ewhisper.cn,<nodeCIDR>,<APIServerInternalURL>,<serviceNetworkCIDRs>,<etcdDiscoveryDomain>,<clusterNetworkCIDRs>,<platformSpecific>,<REST_OF_CUSTOM_EXCEPTIONS>
sudo systemctl restart containerd
sudo systemctl unset-environment HTTP_PROXY
sudo systemctl unset-environment HTTPS_PROXY
sudo systemctl unset-environment NO_PROXY
sudo systemctl restart containerd
MacBook Pro M1 on Monterey system, installed openssl with homebrew previously, but now because this system is old, homebrew can no longer be upgraded, and many software updates depend on it, so I need to install the latest version manually.
brew uninstall openssl
wget https://www.openssl.org/source/openssl-3.4.0.tar.gz
tar -xvf openssl-3.4.0.tar.gz
cd openssl-3.4.0
./Configure darwin64-arm64-cc
make
sudo make install MANDIR=/opt/homebrew/Cellar/openssl@3/3.4.0/share/man MANSUFFIX=ssl
sudo mkdir /opt/homebrew/Cellar/openssl@3/3.4.0/bin
sudo mv /usr/local/bin/openssl /opt/homebrew/Cellar/openssl@3/3.4.0/bin/openssl
ls -s /opt/homebrew/Cellar/openssl@3/3.4.0/bin/openssl /usr/local/bin/openssl
sudo mv /usr/local/share/doc /opt/homebrew/Cellar/openssl@3/3.4.0/share/doc
sudo mv /usr/local/include /opt/homebrew/Cellar/openssl@3/3.4.0/include
sudo mv /usr/local/lib /opt/homebrew/Cellar/openssl@3/3.4.0/lib
sudo mv /usr/local/ssl /opt/homebrew/Cellar/openssl@3/3.4.0/ssl
brew linke openssl@3
Generally speaking, turning off the monitor only requires pressing the monitor's power button. However, if the monitor does not have a power button or there are other reasons, you need to use a command to turn off the monitor.
On linux, you can turn off the monitor with the following command:
终端输入:vmware-netcfg ,来调用 vmware-netcfg 来初始化 vmware 网络模块,但是报错:
Network configuration is missing. Ensure that /etc/vmware/networking exists.
在终端输入:
sudo touch /etc/vmware/x ; sudo vmware-networks --migrate-network-settings /etc/vmware/x ; sudo rm /etc/vmware/x
这是一个很受欢迎的命令行参数解析库。它可以帮助你轻松定义命令行指令和选项,比如定义一个简单的 “--version” 选项来展示脚本版本号,或者定义如 “init” 这样的命令用于初始化项目。
主要用于实现交互式命令行界面。当你需要用户输入一些信息,如用户名、密码或者从给定的选项中选择一个配置时,它非常有用。例如可以通过它让用户选择要安装的软件包版本。
用于在命令行中给文本添加颜色和样式。可以让输出的信息更加醒目,例如把错误信息用红色字体显示,正确的操作提示用绿色字体显示,方便用户区分不同类型的消息。
安装 duti:
brew install duti
在编写 Typescript 应用时,经常需要在代码中引入多个模块或文件,这时候可能会遇到很长的路径名称。特别是相对路径,例如'../../../../some/very/deep/module',让人无法接受。
使用路径别名(path aliases),将这些长路径映射成简短的别名,以方便在代码中进行引用,而且可以提高代码的可读性、可维护性和重用性。
而处理路径别名,已经有成熟的第三方库可用了,例如 tsconfig-paths、module-alias 等,不过更推荐 node 自带的 import mapping 方式解决,它同时支持 require 和 import 的导入方式,而无需按照第三方库。