创建证书 生成证书文件certificate.crt openssl req -x509 -newkey rsa:2048 -keyout [certificate.key] -out [certificate.crt] -days 365 -nodes -subj "/CN=*.example.com" -addext "subjectAltName=DNS:*.example.com" 或 //codefile: sans.cnf [ req ] default_bits = 2048 distinguished_name = req_distinguished_name req_extensions = req_ext x509_extensions = v3_ca prompt = no [ req_distinguished_name ] C = US ST = California L = San Francisco O = Example Company OU = IT Department CN = *.example.com # Primary common name (CN) [ req_
图片指定宽长比 <div class="image"> <div> <img src="xxx" /> </div> </div> padding-top计算百分比的基数是容器的width,示例中宽高比为4:3 percentage: The size of the padding as a percentage, relative to the inline size (width in a horizontal language, defined by writing-mode) of the containing block. Must be nonnegative. .image { width: 100%; padding-top: calc(3 / 4 * 100%); /* calc(Height / Width * Percentage%) */ position: relative; overflow: hidden; div { position: absolute; top: 0; left: 0; bottom: 0; right: 0; img { object-fit: cover
You can generate a self-signed certificate for development purposes using tools like OpenSSL or PowerShell on Windows, or even .NET's own APIs if you’re building the certificate within your .NET code. Here’s how to generate a self-signed certificate using these methods: Method 1: Generate a Self-Signed Certificate with OpenSSL Prerequisites: Make sure you have OpenSSL installed on your system. Generate a Private Key: openssl genpkey -algorithm RSA -out private.key -pkeyopt rsa_keygen_bits:2048 Generate a Ce
config git config --local user.name "tongqijie" git config --local user.email "tongqijie@hotmail.com" git config credential.helper store git config core.ignorecase false: 设置文件名大小写敏感 git config --local --unset user.password git config --local advice.detachedHead false git config --local http.sslVerify false pull git pull push git push clone git clone [remote-repository] [local folder] Chnages git status Stage untracked/modified files/folder git add [file|folder] stage specified single file or specified folde
在当前目录创建conda环境 conda create --prefix ./.venv python=3.12 激活当前目录下conda环境 conda activate ./.venv 退出当前目录下conda环境 conda deactivate 安装python依赖包(requirements.txt) pip install -r /path/to/requirements.txt
RS256 PKCS1格式私钥生成 openssl genrsa -out rs256_private_key.pem 2048 生成的PKCS1格式私钥示例 //codefile:rs256_private_key.pem -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAnAUSXxqv7dsrb42IdwR8yJ+sYi0YCduTXbcNOurVLu9gOOQq 56ArwIwDKF7Tscd0oANRuYaNnPPJrM9D4drHITmK/V6zEerSs6UvJYJ4W+avaWnU DIV+jdQEXJRvflKN/4UdCqF/jdVIXutgkyXbGA3gkwWV0SDbeQPpbPiP5NYO5TI0 Tt1MwY0dWXE9t6GmD4i+k+ZrmMN2is8N7l4TEmBgs6HD+My+HQw2lpoS8rT4eJ76 eOEO6RSxeEc43Hn3e1oOgLj5EI7EaPT8IOtQdLK8qSwbbwc9ZXDN0DLzmCPHSF6B lu0mYE/P+MXQAdwO2bH/Qp3ho24V1KAeO8TCBQIDAQ
link 创建symlink ln -s path-of-source-file path-of-destination-folder process 显示所有进程信息 ps -ef top Shift+M: 内存占用从大到小排列 查询端口占用进程 lsof -i :30100 杀死进程(等同于Ctrl+C) kill -s 2 process-id 根据进程名获取PID ps -ef | grep name | grep -v grep | awk '{print $2}' systemd 重新加载systemd配置 systemctl daemon-reload 查看systemctl日志 journalctl -u service-name.service 如无内容返回,检查systemd-journald.service是否正常运行 设置systemctl日志最大占用磁盘空间 journalctl --vacuum-size=1024M 查询正在运行的服务 systemctl --type=service --state=running nginx 重新加载nginx配置 /etc/init.d/ng
创建索引 curl --request PUT 'http://localhost:9200/logging' 创建成功响应 {"acknowledged":true,"shards_acknowledged":true,"index":"logging"} 删除索引 curl --request DELETE 'http://localhost:9200/logging' 删除成功响应 {"acknowledged":true} 设置字段动态映射 curl --request PUT 'http://localhost:9200/logging/_mapping' \ --header 'Content-Type: application/json' \ --data-raw '{ "dynamic": true }' 设置成功响应 {"acknowledged":true} 创建字段 keyword类型字段 curl --request PUT 'http://localhost:9200/logging/_mapping' \ --header 'Content-Type: application/js
安装文档: https://github.com/loic-sharma/BaGet?tab=readme-ov-file#getting-started 通过nginx反向代理配置授权访问 server { location / { auth_basic "authorization"; auth_basic_user_file /etc/nginx/secrets/baget.htpasswd; proxy_pass http://localhost:9000/; } } 修改nuget配置,设置访问用户名和密码 windows: %appdata%\NuGet\NuGet.Config mac: $HOME/.nuget/NuGet/NuGet.Config //codefile: $HOME/.nuget/NuGet/NuGet.Config <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="Baget" value="your_baget_url" /> </packageSources
登录 psql postgres 退出 postgres=# \q 查询用户 postgres=# \du 创建用户postgres postgres=# CREATE USER postgres WITH ENCRYPTED PASSWORD 'password'; 创建数据库testdb postgres=# CREATE DATABASE "testdb"; 授予用户权限 postgres=# GRANT ALL PRIVILEGES ON DATABASE "testdb" TO postgres;