Skip to content

Instantly share code, notes, and snippets.

View Abirdcfly's full-sized avatar
😶

Abirdcfly

😶
View GitHub Profile

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
@Abirdcfly
Abirdcfly / how-to-ssh-into-windows.md
Created June 28, 2024 05:54 — forked from teocci/how-to-ssh-into-windows.md
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

离离原上草
一岁一枯荣
野火烧不尽
春风吹又生
@Abirdcfly
Abirdcfly / git-github-start.md
Last active January 18, 2024 02:08
新手如何使用git / github 参与代码协作 How to use git / github for newbies to participate in code collaboration

Keybase proof

I hereby claim:

  • I am abirdcfly on github.
  • I am abirdcfly (https://keybase.io/abirdcfly) on keybase.
  • I have a public key ASCfmTYgVguLgHTklKSDFLsmbMzc0MjxJ6YPFXxMvkvAfgo

To claim this, I am signing this object:

@Abirdcfly
Abirdcfly / 📊 Weekly development breakdown
Last active August 26, 2023 06:17
📊 Weekly development breakdown
Other 29 hrs 3 mins ██████████████▋░░░░░░ 70.2%
Go 5 hrs 8 mins ██▌░░░░░░░░░░░░░░░░░░ 12.4%
sh 4 hrs 19 mins ██▏░░░░░░░░░░░░░░░░░░ 10.4%
Markdown 1 hr 44 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.2%
Bash 35 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.4%
# coding=utf-8
prob_start = []
prob_trans = []
prob_emit = []
MIN_FLOAT = -3.14e100
STATE = {0: "B", 1: "E", 2: "M", 3: "S"}
def load_dicts(filename="hmm_model.utf8"):