Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

4. Reference

Jeffrey edited this page Sep 30, 2023 · 22 revisions

4.1 Main

4.2 Others

4.3 Proxy

4.3.1 cpanm

cpanm -n App::cpanminus --mirror http://mirrors.163.com/cpan --mirror-only
npm config rm registry
npm config set proxy=http://127.0.0.1:7890
npm config set https-proxy http://127.0.0.1:7890
npm config list
# 如果需要取消代理
npm config delete proxy
npm config delete https-proxy

4.3.2 gem

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/

4.3.3 github

[http "https://github.com"]
	# no need to setup https for github
	# http proxy 
	proxy = http://127.0.0.1:7890
	# or can use socks5 proxy
	#proxy = socks5://127.0.0.1:7891
[https]
	proxy = https://127.0.0.1:7890

#https://raw.githubusercontent.com/double12gzh/dotfiles/main/ssh/.ssh/config
#https://raw.githubusercontent.com/double12gzh/dotfiles/main/git/.config/git/config
#https://gist.github.com/laispace/666dd7b27e9116faece6
https://stackoverflow.com/questions/70603564/windows-ssh-proxycommand-usr-bin-bash-line-0-exec-nc-not-found-on-git-bash

4.3.4 ssh

add the following to ~/.ssh/config and run cmd ssh -vvv -T git@github.com with debug

Host github.com
  User git
  Port 443
  Hostname ssh.github.com
  # http proxy
  #ProxyCommand connect -S 127.0.0.1:7890 %h %p
  #socks5 proxy
  ProxyCommand nc -X 5 -x 127.0.0.1:7891 %h %p
  IdentityFile ~/.ssh/id_rsa
  TCPKeepAlive yes

Host ssh.github.com
  User git
  Port 443
  Hostname ssh.github.com
  TCPKeepAlive yes
  IdentityFile ~/.ssh/id_rsa
  PreferredAuthentications publickey
  # http proxy
  #ProxyCommand connect -S 127.0.0.1:7890 %h %p
  #socks5 proxy
  ProxyCommand nc -X 5 -x 127.0.0.1:7891 %h %p

Host *
  # 共享连接
  ControlMaster auto
  # 与上述 ControlMaster 同时使用时,指定连接共享的路径
  ControlPath ~/.ssh/master-%r@%h:%p
  # 在后台保持打开
  ControlPersist yes
  ServerAliveInterval 60
  IdentityFile ~/.ssh/id_rsa
  HostKeyAlgorithms +ssh-dss
  # http proxy
  #ProxyCommand connect -S 127.0.0.1:7890 %h %p
  #socks5 proxy
  ProxyCommand nc -X 5 -x 127.0.0.1:7891 %h %p

# http://man.openbsd.org/ssh_config.5
# https://gist.github.com/laispace/666dd7b27e9116faece6
# https://gist.github.com/evantoli/f8c23a37eb3558ab8765

4.3.5 安装 Fire Code Font

在 Ubuntu 上安装 Nerd Fonts,你可以按照以下步骤操作:
打开终端。
‎
下载你想要的 Nerd Font。例如,如果你想要下载 Fira Code Nerd Font,你可以运行以下命令:
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip
‎
3. 解压下载的字体文件:
unzip FiraCode.zip
‎
4. 创建一个 .fonts 目录(如果还没有的话)并将字体文件移动到这个目录:
mkdir -p ~/.fonts
mv *.ttf ~/.fonts/
‎
5. 更新字体缓存:
fc-cache -fv
‎
6. 现在,你应该可以在你的终端或文本编辑器的字体设置中看到新安装的 Nerd Font 了。
注意:你需要将上述命令中的 FiraCode.zip 替换为你实际下载的字体文件的名称。你可以在 Nerd Fonts 的 GitHub 仓库的 "Releases" 页面找到所有可用的字体。

Clone this wiki locally