avatar
童琦杰
  1. 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
  2. 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
  3. 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
  4. 创建索引 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
  5. 安装文档: 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
  6. 登录 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;
  7. 创建Solution文件,文件名为demo-solution.sln dotnet new sln --name demo-solution 创建src目录 mkdir src 创建Console应用项目作为App入口 dotnet new console --output src/DemoSolution.WebApp --framework net6.0 --use-program-main 将Console应用添加到Solution中 dotnet sln demo-solution.sln add src/DemoSolution.WebApp 添加依赖包 dotnet add src/DemoSolution.WebApp package package-name --version 1.0.0 配置文件夹输出 <Project Sdk="Microsoft.NET.Sdk"> <ItemGroup> <None Include="Configuration\**\*;"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <
  8. 使用RVM管理多版本Ruby 安装RVM: GPG keys gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB \curl -sSL https://get.rvm.io | bash -s stable //codefile: $Home/.zshrc export PATH=$PATH:$HOME/.rvm/bin 使用RVM安装Ruby: rvm install [Version] 使用homebrew安装Ruby brew install ruby rvm mount [/opt/homebrew/Cellar/ruby/3.3.0] 使用RVM切换不同版本Ruby 查询可用版本 rvm list 使用指定版本Ruby rvm use [Version]
  9. 安装 sudo dpkg -i gitlab-ce_9.2.5-ce.0_amd64.deb sudo gitlab-ctl reconfigure 如需重启服务 sudo gitlab-ctl restart 备份 sudo gitlab-rake gitlab:backup:create 默认备份文件位置: /var/opt/gitlab/backups 备份配置文件及密匙: /etc/gitlab/gitlab.rb、/etc/gitlab/gitlab-secrets.json 恢复 sudo cp gitlab.rb /etc/gitlab/gitlab.rb sudo cp gitlab-secrets.json /etc/gitlab/gitlab-secrets.json sudo cp 1622265010_2021_05_29_9.2.5_gitlab_backup.tar /var/opt/gitlab/backups/ sudo gitlab-ctl stop unicorn sudo gitlab-ctl stop sidekiq sudo gitlab-ctl status sud
  10. /element-name 获取元素名为element-name的根元素。理论上一个合法的XML文件只会有一个根元素。 <!-- this element matched --> <element-name> <parent> <element-name></element-name> </parent> </element-name> //element-name 获取当前元素下所有元素名为element-name的元素。 <root> <parent> <!-- this element matched --> <element-name> <!-- this element matched --> <element-name></element-name> </element-name> <!-- this element matched --> <element-name></element-name> </parent> </root> . 获取当前元素。 .. 获取当前元素的父元素。 * 获取当前元素下所有元素。 //parent/element-name[1] 获取第一个元素名为element-
© 2015-2022 tongqijie.com 版权所有沪ICP备17000682号