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;
创建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> <
使用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]
安装 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